Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: flip-flop socket locations if 1 is down

by monkey_boy (Priest)
on Jun 09, 2005 at 16:51 UTC ( #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? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2021-10-25 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (89 votes). Check out past polls.

    Notices?