On Fri, Oct 23, 2009 at 6:32 AM, <odea...@apache.org> wrote: > Author: odeakin > Date: Fri Oct 23 13:32:06 2009 > New Revision: 829056 > > URL: http://svn.apache.org/viewvc?rev=829056&view=rev > Log: > The port library hysock_connect_with_timeout() function only takes an > unsigned 32bit value as a timeout (with a maximum value of 100ms), so > passing -1 here for a blocking connect makes no sense. Instead poll the call > with 100ms timeouts for a while before throwing a ConnectException to > indicate failure. >
Wouldn't it be more appropriate to just relax the constraints on hysock_connect_with_timeout? I doubt anyone who's wants a no-timeout call really wants a 100 second timeout plus 1000 calls out to the network. This wastes bandwidth, CPU, battery...