mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-29 03:14:04 +00:00
Fix blocking close with LWIP_SO_SNDTIMEO
This fixes a bug in close when LWIP_SO_SNDTIMEO is enabled, but the option is not in use on the socket A simple mis-typed comparison against zero would cause the close_timeout to get set to zero if conn->send_timeout was 0 The intended check was to over-ride the default close timeout if a send timeout had been specified via SO_SNDTIMEO
This commit is contained in:
parent
70487a43d4
commit
11faa8149e
@ -886,7 +886,7 @@ lwip_netconn_do_close_internal(struct netconn *conn WRITE_DELAYED_PARAM)
|
||||
/* this is kind of an lwip addition to the standard sockets: we wait
|
||||
for some time when failing to allocate a segment for the FIN */
|
||||
#if LWIP_SO_SNDTIMEO
|
||||
if (conn->send_timeout >= 0) {
|
||||
if (conn->send_timeout > 0) {
|
||||
close_timeout = conn->send_timeout;
|
||||
}
|
||||
#endif /* LWIP_SO_SNDTIMEO */
|
||||
|
Loading…
Reference in New Issue
Block a user