Stop firewall handler earlier
This commit is contained in:
@@ -81,6 +81,11 @@ func cleanConnections() (activePIDs map[int]struct{}) {
|
|||||||
// Step 2: mark as ended
|
// Step 2: mark as ended
|
||||||
if !exists {
|
if !exists {
|
||||||
conn.Ended = nowUnix
|
conn.Ended = nowUnix
|
||||||
|
|
||||||
|
// Stop the firewall handler, in case one is running.
|
||||||
|
conn.StopFirewallHandler()
|
||||||
|
|
||||||
|
// Save to database.
|
||||||
conn.Save()
|
conn.Save()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,8 +98,6 @@ func cleanConnections() (activePIDs map[int]struct{}) {
|
|||||||
// DEBUG:
|
// DEBUG:
|
||||||
// log.Tracef("network.clean: deleted %s (ended at %s)", conn.DatabaseKey(), time.Unix(conn.Ended, 0))
|
// 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.
|
// Remove connection from state.
|
||||||
conn.delete()
|
conn.delete()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user