Fix cleaning up incomplete connections

This commit is contained in:
Daniel
2023-08-07 21:55:31 +02:00
parent 2a41240212
commit 805a8e9e85
2 changed files with 18 additions and 3 deletions

View File

@@ -821,8 +821,10 @@ func (conn *Connection) StopFirewallHandler() {
conn.firewallHandler = nil
// Signal the packet handler worker that it can stop.
close(conn.pktQueue)
conn.pktQueueActive = false
if conn.pktQueueActive {
close(conn.pktQueue)
conn.pktQueueActive = false
}
// Unset the packet queue so that it can be freed.
conn.pktQueue = nil