Skip to content

Commit

Permalink
TUN-7477: Decrement UDP sessions on shutdown
Browse files Browse the repository at this point in the history
When a tunnel connection is going down, any active UDP sessions
need to be cleared and the metric needs to be decremented.
  • Loading branch information
DevinCarr committed Jul 6, 2023
1 parent ccad59d commit 5aaab96
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion datagramsession/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}
}

Expand Down

0 comments on commit 5aaab96

Please sign in to comment.