[En-Nut-Discussion] killing threads waiting for a connection in NutTcpAccept
José Vallet
jose.vallet at hut.fi
Fri Apr 24 17:33:32 CEST 2009
Hello Harald.
Thanks for the help, and sorry to answer late (though better late than
never). So, just for future reference.
Harald Kipp wrote:
>> Actually closing the socket is what we tried first, but unfortunately it
>> didn't work. When the socket is closed NutTcpAccept continues blocking
>> the thread.
>
> In fact the socket is in TCPS_LISTEN state. When closing this socket, it
> is simply destroyed, leaving the listening thread in a blocked state.
> I'd consider this a bug.
I didn't want to say that myself ;-)
Is this suitable for a bug report?
>
> NutTcpAbortSocket(sock, ECONNRESET);
>
> should help here. Although its description states, that it should not be
> called by application code, it is cleaner than using the internals of
> the TCPSOCKET structure.
This works well so far.
Thanks!
José
More information about the En-Nut-Discussion
mailing list