From d21b405a21bedff0180589b03b72adac772983b8 Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Tue, 14 Jun 2022 21:52:02 -0400 Subject: [PATCH] Fix panic. Fixes #1055 --- router/fabric/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()