diff --git a/components/lwip/core/tcp_out.c b/components/lwip/core/tcp_out.c index 5ea0ffa76..aa638273d 100755 --- a/components/lwip/core/tcp_out.c +++ b/components/lwip/core/tcp_out.c @@ -1066,6 +1066,9 @@ tcp_output(struct tcp_pcb *pcb) #if TCP_OVERSIZE_DBGCHECK seg->oversize_left = 0; + if (seg->next == NULL) { + pcb->unsent_oversize = 0; + } #endif /* TCP_OVERSIZE_DBGCHECK */ err = tcp_output_segment(seg, pcb); if ((err != ERR_OK) && (err != ERR_RTE)) {