in reply to Re: IO::Socket *always* making connection?
in thread IO::Socket *always* making connection?
As such (such being that IO::Socket::INET does not die or set $@ on failure), you'd want one of the following code snippets:# best solution: $socketA = new IO::Socket::INET( PeerAddr => $A_box_address, PeerPort => $A_box_port, Proto => 'tcp', ) or $skipA = 1;
That is exactly how my code used to look prior to encountering this problem. I thought that eval might help me catch it, but obviously no... Everybody seems to think eval is my problem now... With the code looking exactly as above, I still do not see $skipA == 1 unless I kill the program at the PeerPort. If it is simply busy with another client, $skipA stays == 0.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: IO::Socket *always* making connection?
by saskaqueer (Friar) on Feb 08, 2005 at 19:01 UTC | |
by wolfger (Deacon) on Feb 08, 2005 at 19:12 UTC | |
|