1
0
mirror of https://github.com/fumiama/terasu-cloudflared.git synced 2026-06-05 00:50:24 +08:00

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

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,
})
}
}