From 7115384b151b2aa003cd2c332bbf6fa757a271c5 Mon Sep 17 00:00:00 2001 From: Jens Nielsen Date: Sun, 24 Sep 2017 15:17:00 +0200 Subject: [PATCH] Clear seg->oversize_left after sending OK Signed-off-by: goldsimon --- src/core/tcp_out.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index f72c03a5..58fdaac3 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -1221,15 +1221,15 @@ tcp_output(struct tcp_pcb *pcb) TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); } -#if TCP_OVERSIZE_DBGCHECK - seg->oversize_left = 0; -#endif /* TCP_OVERSIZE_DBGCHECK */ err = tcp_output_segment(seg, pcb, netif); if (err != ERR_OK) { /* segment could not be sent, for whatever reason */ tcp_set_flags(pcb, TF_NAGLEMEMERR); return err; } +#if TCP_OVERSIZE_DBGCHECK + seg->oversize_left = 0; +#endif /* TCP_OVERSIZE_DBGCHECK */ pcb->unsent = seg->next; if (pcb->state != SYN_SENT) { tcp_clear_flags(pcb, TF_ACK_DELAY | TF_ACK_NOW);