Skip to content

Commit

Permalink
Merge pull request #496 from openziti/refresh-bind-session-on-fail
Browse files Browse the repository at this point in the history
Refresh the edge session if listen fails. Fixes #495
  • Loading branch information
plorenz authored Feb 8, 2024
2 parents b6509b8 + 654358b commit 56515b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ziti/ziti.go
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ func (context *ContextImpl) setUnauthenticated() {
context.CtrlClt.ApiSessionCertificate = nil

context.CloseAllEdgeRouterConns()
context.sessions.Clear()

if willEmit {
context.Emit(EventAuthenticationStateUnauthenticated, prevApiSession)
Expand Down Expand Up @@ -1922,6 +1923,7 @@ func (event *routerConnectionListenFailedEvent) handle(mgr *listenerManager) {
mgr.disconnectedTime = &now
}
mgr.notify(ListenerRemoved)
mgr.refreshSession() // if a listener failed, ensure our session is valid
mgr.makeMoreListeners()
}

Expand Down

0 comments on commit 56515b7

Please sign in to comment.