Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: flip-flop socket locations if 1 is down

by monkey_boy (Priest)
on Jun 09, 2005 at 16:51 UTC ( [id://465202]=note: print w/replies, xml ) Need Help??


in reply to flip-flop socket locations if 1 is down

Try changing:
last if($remote = IO::Socket::INET->new(Proto => 'tcp', PeerAddr => $ +transaction_ips[($i%2)], PeerPort => 8120, Timeout => 5));
to:
$remote = IO::Socket::INET->new(Proto => 'tcp', PeerAddr => $transacti +on_ips[($i%2)], PeerPort => 8120, Timeout => 5)); last if $remote;



This is not a Signature...

Replies are listed 'Best First'.
Re^2: flip-flop socket locations if 1 is down
by bear0053 (Hermit) on Jun 09, 2005 at 22:46 UTC
    thank you for your suggestion. can i ask what is the reason that you suggested this change?
    is the first way not doing the same thing by checking the result of the assignment.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://465202]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-24 10:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found