From c97293f55cceb6691c68b351df232272f04f9fda Mon Sep 17 00:00:00 2001 From: David Cermak Date: Tue, 29 Dec 2020 21:35:25 +0100 Subject: [PATCH] tcp_in: Flag the pcb as closing if TCP_EVENT_CLOSED refused 2.1.3-esp: 223101f1 tcp_in: Flag the pcb as closing if TCP_EVENT_CLOSED refused --- src/core/tcp_in.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c index cfd1b595..b1701c00 100644 --- a/src/core/tcp_in.c +++ b/src/core/tcp_in.c @@ -541,6 +541,8 @@ tcp_input(struct pbuf *p, struct netif *inp) TCP_EVENT_CLOSED(pcb, err); if (err == ERR_ABRT) { goto aborted; + } else if (err == ERR_MEM) { + tcp_set_flags(pcb, TF_CLOSEPEND); } } }