lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] netconn/netbuf api with receiving timeout missing close


From: Dmitri Snejko
Subject: Re: [lwip-users] netconn/netbuf api with receiving timeout missing closed connection
Date: Tue, 03 Nov 2009 23:39:47 -0500
User-agent: Thunderbird 2.0.0.23 (Windows/20090812)

Kieran Mansley wrote:
On Fri, 2009-10-30 at 23:27 -0400, Dmitri Snejko wrote:
I tried 1.3.1 and the last api_lib.c from SVC with a fix for
netconn_recv. It is still loosing closed conditions. I think there is something more then just racing conditions in on netconn->err. I found if i use 0 timeout closed remote side cached well but if i close the client side suddenly on the middle of transition LwIP won't recover and close the connection with a timeout. It still keep it opened. Socket API build on netconn as well is doing well in all situations.

Can you get a packet capture to show the case where lwIP fails to spot
the closed connection?

Thanks

Kieran



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.423 / Virus Database: 270.14.45/2476 - Release Date: 11/02/09 07:51:00

Hello Kieran,

I have found the reason why the closed connection was missed with receiving timeout set to 0. It was my application problem. The remote side application was closed and windows stack sent RST. Netconn_recv set err to ERR_RST. My application tried to close the netconn calling netconn_close, netconn_delete. Netconn_close nether returned back frizzing the receiving task. I removed netconn_close and left only netconn_delete, never missed ERR_RST or ERR_CLSD any more. For timeout set >0 lwip is still missing closed connections but it could be the racing you mentioned. I found the all idea doesn't work well and the application should follow sockets select way to be really nonblocking on multiple netconns. Thanks
Dmitri.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]