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
parent ccad59dfab
commit 5aaab967a3
1 changed files with 4 additions and 1 deletions

View File

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