From c2f7e166a0ceb556a9b40f5a4f5260630de88777 Mon Sep 17 00:00:00 2001 From: sg Date: Tue, 18 Aug 2015 20:32:09 +0200 Subject: [PATCH] fixed bug #45723 netconn_delete unconditionally uses macro TCP_SLOW_INTERVAL --- src/api/api_lib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/api_lib.c b/src/api/api_lib.c index b36eefeb..c61bf961 100644 --- a/src/api/api_lib.c +++ b/src/api/api_lib.c @@ -131,8 +131,10 @@ netconn_delete(struct netconn *conn) sys_now() + conn->send_timeout */ API_MSG_VAR_REF(msg).msg.msg.sd.time_started = sys_now(); #else /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ +#if LWIP_TCP API_MSG_VAR_REF(msg).msg.msg.sd.polls_left = ((LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT + TCP_SLOW_INTERVAL - 1) / TCP_SLOW_INTERVAL) + 1; +#endif /* LWIP_TCP */ #endif /* LWIP_SO_SNDTIMEO || LWIP_SO_LINGER */ TCPIP_APIMSG(&API_MSG_VAR_REF(msg), lwip_netconn_do_delconn, err); API_MSG_VAR_FREE(msg);