On Saturday, April 26, 2014 11:09:04 PM UTC+5:30, Iñaki Baz Castillo wrote:
>
> 2014-04-26 19:09 GMT+02:00 Ashish <[email protected] <javascript:>>: 
> > On Windows, if a server is down, uv_tcp_connect (trying to connect to 
> the 
> > server) takes too long (almost 20 seconds) before it invokes callback 
> > (uv_connect_cb). 
> > 
> > (In the distributed computing environment this hampers overall system 
> when 
> > one of the servers suddenly goes down) 
> > 
> > How can this issue be addressed? Afterall what decides this time 
> duration? 
> > Is there any way to reduce it? 
>
> In Linux the TCP connection timeout is a configurable kernel setting. 
> In Windows no idea. 
>
> Anyhow, you can keep a state (connected = 1/0) and run a uv_timer that 
> fires after N seconds, checks the connected value (which is set to 1 
> in the on_connect_cb) and, in case it is still 0, then call to 
> uv_close() for the TCP handle and continue with your desired logic. 
>
>
> -- 
> Iñaki Baz Castillo 
> <[email protected] <javascript:>> 
>


Sounds good :) Thank you very much.
(Btw I found its TcpMaxDataRetransmissions registry setting in Windows)

Tnx,
Ashish

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to