mirror of
https://github.com/openziti/ziti.git
synced 2026-10-12 15:28:05 +00:00
Fix deadlock in router session event processing. Fixes #1350
This commit is contained in:
@@ -217,7 +217,7 @@ func (sm *StateManagerImpl) GetApiSession(token string) *edge_ctrl_pb.ApiSession
|
||||
|
||||
func (sm *StateManagerImpl) AddEdgeSessionRemovedListener(token string, callBack func(token string)) RemoveListener {
|
||||
if sm.recentlyRemovedSessions.Has(token) {
|
||||
callBack(token)
|
||||
go callBack(token) // callback can be long process with network traffic. Don't block event processing
|
||||
return func() {}
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ func (sm *StateManagerImpl) AddEdgeSessionRemovedListener(token string, callBack
|
||||
eventName := sm.getEdgeSessionRemovedEventName(token)
|
||||
|
||||
listener := func(args ...interface{}) {
|
||||
callBack(token)
|
||||
go callBack(token) // callback can be long process with network traffic. Don't block event processing
|
||||
}
|
||||
sm.AddListener(eventName, listener)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user