drain ack_q

This commit is contained in:
jeka committed 2026-03-21 19:25:09 +03:00
1 parent 3b3b411c70
commit ff0e27c75c
1 file changed
+2
+2
View File
@@ -191,6 +191,7 @@ void etcp_connection_close(struct ETCP_CONN* etcp) {
drain_and_free_queue(&etcp->input_send_q);
drain_and_free_queue(&etcp->input_wait_ack);
drain_and_free_queue(&etcp->recv_q);
drain_and_free_queue(&etcp->ack_q);
// Drain and free ack_q (contains ACK_PACKET from ack_pool - special handling)
if (etcp->ack_q) {
@@ -265,6 +266,7 @@ void etcp_conn_reset(struct ETCP_CONN* etcp) {
clear_queue(etcp->input_send_q);
clear_queue(etcp->input_wait_ack);
clear_queue(etcp->recv_q);
clear_queue(etcp->ack_q);
// Reset timers (just clear the pointers - timers will expire naturally)
etcp->retrans_timer = NULL;