mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-27 06:14:09 +00:00
slightly rearranged freeing an acked segment to prevent keeping the reference too long
This commit is contained in:
parent
ce98df59f1
commit
b4c4fae3f5
@ -688,6 +688,7 @@ tcp_process(struct tcp_pcb *pcb)
|
|||||||
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"U16_F"\n", (u16_t)pcb->snd_queuelen));
|
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"U16_F"\n", (u16_t)pcb->snd_queuelen));
|
||||||
rseg = pcb->unacked;
|
rseg = pcb->unacked;
|
||||||
pcb->unacked = rseg->next;
|
pcb->unacked = rseg->next;
|
||||||
|
tcp_seg_free(rseg);
|
||||||
|
|
||||||
/* If there's nothing left to acknowledge, stop the retransmit
|
/* If there's nothing left to acknowledge, stop the retransmit
|
||||||
timer, otherwise reset it to start again */
|
timer, otherwise reset it to start again */
|
||||||
@ -698,8 +699,6 @@ tcp_process(struct tcp_pcb *pcb)
|
|||||||
pcb->nrtx = 0;
|
pcb->nrtx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
tcp_seg_free(rseg);
|
|
||||||
|
|
||||||
/* Call the user specified function to call when sucessfully
|
/* Call the user specified function to call when sucessfully
|
||||||
* connected. */
|
* connected. */
|
||||||
TCP_EVENT_CONNECTED(pcb, ERR_OK, err);
|
TCP_EVENT_CONNECTED(pcb, ERR_OK, err);
|
||||||
|
Loading…
Reference in New Issue
Block a user