Skip to content

Commit

Permalink
Stop firewall handler earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaavi committed Aug 11, 2023
1 parent 3b70c55 commit 9182063
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions network/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ func cleanConnections() (activePIDs map[int]struct{}) {
// Step 2: mark as ended
if !exists {
conn.Ended = nowUnix

// Stop the firewall handler, in case one is running.
conn.StopFirewallHandler()

// Save to database.
conn.Save()
}

Expand All @@ -93,8 +98,6 @@ func cleanConnections() (activePIDs map[int]struct{}) {
// DEBUG:
// log.Tracef("network.clean: deleted %s (ended at %s)", conn.DatabaseKey(), time.Unix(conn.Ended, 0))

// Stop the firewall handler, in case one is running.
conn.StopFirewallHandler()
// Remove connection from state.
conn.delete()
}
Expand Down

0 comments on commit 9182063

Please sign in to comment.