in reply to IO::Socket disconnects in loop

writer.pl can eventually be restarted (it instantly dies with "Could not connect" a few times though)

That makes no sense. Or is does "it" in the parens refer to the reader? How can it die more than once? How it can it die and be left running?

writer.pl instantly dies a couple of times.

How can it die more than once? What's the error message? Why don't you print the cause of the error ($!) when you call die?

Replies are listed 'Best First'.
Re^2: IO::Socket disconnects in loop
by carlin (Beadle) on Jun 14, 2009 at 04:06 UTC
    $ perl reader.pl [in separate terminal] $ perl writer.pl [runs for a while] Could not connect $ perl writer.pl Could not connect $ perl writer.pl Could not connect $ perl writer.pl Could not connect $ perl writer.pl [runs for a while] Could not connect $ killall perl $ perl reader.pl $ perl writer.pl Could not connect
      Me bad, I thought the server was the writer.