Subject: Re: [En-Nut-Discussion] CLOSE-WAIT Status TCP sockets

Ralph Mason ralph.mason at telogis.com
Tue Jul 22 19:41:35 CEST 2003


>From my understanding sending a Reset is quite a common way to 'torpedo' a
connection (I believe it's called an abrupt close)

It stops the need to the FIN WAIT after the socket has closed, Thus freeing
memory sooner.

I think some web servers do it by default, and can understand why embedded
systems would do this also.


Ralph


> -----Original Message-----
> From: en-nut-discussion-admin at egnite.de
> [mailto:en-nut-discussion-admin at egnite.de]On Behalf Of Harald Kipp
> Sent: Wednesday, 23 July 2003 2:05
> To: en-nut-discussion at egnite.de
> Subject: Re: Subject: Re: [En-Nut-Discussion] CLOSE-WAIT Status TCP
> sockets
>
>
> I think I found the problem, hopefully.
>
> Yes Dave, the socket enters CLOSE-WAIT when the peer sends a RESET.
> This happens, for example, when the peer died with an established
> connection. Any attempt sending new sements on that connection
> will result in a RESET response.
>
> But when the local application closes the socket, it will
> move from CLOSE-WAIT the LAST-ACK state. This will send
> a FIN-ACK. If the peer responds with RESET, then the socket
> is destroyed. If the peer doesn't respond, then
> NutTcpStateRetranTimeout() will change the state to CLOSE-WAIT
> again, which is miserably wrong.
>
> The buggy part seems to be in THREAD(NutTcpSm).
>
> Harald
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo/en-nut-discussion
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003




More information about the En-Nut-Discussion mailing list