diff options
Diffstat (limited to 'api/context.go')
-rw-r--r-- | api/context.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/api/context.go b/api/context.go index 257f43174..7466d0b05 100644 --- a/api/context.go +++ b/api/context.go @@ -474,6 +474,14 @@ func GetSession(token string) *model.Session { func RemoveAllSessionsForUserId(userId string) { + RemoveAllSessionsForUserIdSkipClusterSend(userId) + + if einterfaces.GetClusterInterface() != nil { + einterfaces.GetClusterInterface().RemoveAllSessionsForUserId(userId) + } +} + +func RemoveAllSessionsForUserIdSkipClusterSend(userId string) { keys := sessionCache.Keys() for _, key := range keys { @@ -485,9 +493,6 @@ func RemoveAllSessionsForUserId(userId string) { } } - if einterfaces.GetClusterInterface() != nil { - einterfaces.GetClusterInterface().RemoveAllSessionsForUserId(userId) - } } func AddSessionToCache(session *model.Session) { |