|
|
|
|
@ -164,6 +164,16 @@ void etcp_connection_close(struct ETCP_CONN* etcp) {
|
|
|
|
|
DEBUG_TRACE(DEBUG_CATEGORY_ETCP, ""); |
|
|
|
|
if (!etcp) return; |
|
|
|
|
|
|
|
|
|
// Cancel active timers to prevent memory leaks
|
|
|
|
|
if (etcp->retrans_timer) { |
|
|
|
|
uasync_cancel_timeout(etcp->instance->ua, etcp->retrans_timer); |
|
|
|
|
etcp->retrans_timer = NULL; |
|
|
|
|
} |
|
|
|
|
if (etcp->ack_resp_timer) { |
|
|
|
|
uasync_cancel_timeout(etcp->instance->ua, etcp->ack_resp_timer); |
|
|
|
|
etcp->ack_resp_timer = NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
routing_del_conn(etcp); |
|
|
|
|
|
|
|
|
|
// Notify BGP about connection closure (send withdraws, remove from senders_list)
|
|
|
|
|
|