On Thursday, November 27, 2014 10:33:34 PM UTC+5:30, Saúl Ibarra Corretgé wrote: > > On 11/27/2014 05:07 PM, Ashish wrote: > > > > I happen to see my server (being developed using libuv) doesn't _always_ > > get notification whenever client gets terminated abruptly. Most of the > > time I get the notification in read callback, but not always. > > > > You should *always* get it, once connected. Under what circumstances > don't you get it? Do you know that the remote closed the connection? >
Its not certain. But when I run simulator (that simulates around thousand connections) and if the simulator terminates abruptly, occasionally my server still keep showing some active connections (event "netstat -a" also shows them) This is not uncommon I believe because I found one more relevant thread discussing same issue of never receiving TCP FIN (However couldn't find resolution in that thread also) https://groups.google.com/forum/#!topic/libuv/nJa3WeiVs2U > > As a result, the connection remains valid but it is useless as client is > > not connected anymore. > > > > Is there any way to close these connection (such that they get > > terminated after some time) ? > > > > (Btw, I could see function uv_tcp_keepalive and tried using that but no > > luck) > > > > Keep-alives are supposed to help here... if you run a packet capture on > one of the dead connections, do you see responses for the keep-alives? > > Sure, next time whenever I run into this issue I'll try packet capture and will check. > > Cheers, > > -- > Saúl Ibarra Corretgé > bettercallsaghul.com > > > -- 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.
