From: Pat Maddox Date: 2005-04-03T07:21:41+09:00 Subject: Re: Handling Timeout::Error from TCPSocket I'm going to be running this test every minute. If it takes two minutes to time out, that doesn't do me any good. On Apr 2, 2005 3:08 PM, Glenn Parker wrote: > Pat Maddox wrote: > > Alright, basically this is what I want to do. > > > > Try to make a connection to a port, with a maximum timeout value of 3 > > seconds. If it times out, try again two more times. If the port is > > closed, just give up. So the second guess you made is more accurate. > > If you're going to be retrying the same server over and over again, you > might as well let it timeout on its own instead of interrupting it > prematurely just so you can start over again. > > However, if you were attempting connections across a list of replicated > servers, stopping on the first successful connection, then this might be > worth doing, but you might be better off using several threads in that case. > > -- > Glenn Parker | glenn.parker-AT-comcast.net | > >