in reply to Re: IO::Socket *always* making connection?
in thread IO::Socket *always* making connection?

Did you test this code? Because it is not working on my system. In fact, it's a step backwards... The original code for A and C would die gracefully ("couldn't send message to connected socket") if I killed B, and with your revised code for A/C, they both keep merrily sending messages. I also tried your fix for B, but it behaves the same way as my original B. :-(

edit: I'm guessing this code is non-functional for the same reason mine is... C *thinks* it is making this connection, even though B proceeds to ignore everything it says. So you set alarm(5), you make the fake connection, and you set alarm(0). The crux of the problem is (and always has been), "why does C think it has the connection?"


--
Linux, sci-fi, and Nat Torkington, all at Penguicon 3.0
perl -e 'print(map(chr,(0x4a,0x41,0x50,0x48,0xa)))'