Subject: Re: [En-Nut-Discussion] CLOSE-WAIT Status TCP sockets
Harald Kipp
harald.kipp at egnite.de
Tue Jul 22 16:04:58 CEST 2003
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
More information about the En-Nut-Discussion
mailing list