TUN-7477: Decrement UDP sessions on shutdown

When a tunnel connection is going down, any active UDP sessions
need to be cleared and the metric needs to be decremented.
This commit is contained in:
Devin Carr 2023-07-05 16:11:24 -07:00 committed by Jean Khawand
parent 5e459fdbf7
commit 8cda225789
1 changed files with 4 additions and 1 deletions

View File

@ -92,7 +92,10 @@ func (m *manager) shutdownSessions(err error) {
byRemote: true,
}
for _, s := range m.sessions {
s.close(closeSessionErr)
m.unregisterSession(&unregisterSessionEvent{
sessionID: s.ID,
err: closeSessionErr,
})
}
}