diff --git a/router/fabric/manager.go b/router/fabric/manager.go index 8a4b386a1..aab699933 100644 --- a/router/fabric/manager.go +++ b/router/fabric/manager.go @@ -328,7 +328,7 @@ func (sm *StateManagerImpl) AddConnectedApiSessionWithChannel(token string, remo var sessions *MapWithMutex for sessions == nil { - if _, ok := sm.activeApiSessions.Get(token); ok { + if sessions, _ = sm.activeApiSessions.Get(token); sessions != nil { sessions.Put(ch, removeCB) } else { sessions = newMapWithMutex()