summaryrefslogtreecommitdiffstats
path: root/api/context.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-10-25 05:56:06 -0700
committerChristopher Speller <crspeller@gmail.com>2016-10-25 08:56:06 -0400
commit3e1fc76bf97703e730038d7bead7a35cbda970cd (patch)
tree48d2db5b3a1eba82ecaab8b27f7aa590fcaaf8f3 /api/context.go
parent57eb69927c3f990326e13888e40f0feb740a4e19 (diff)
downloadchat-3e1fc76bf97703e730038d7bead7a35cbda970cd.tar.gz
chat-3e1fc76bf97703e730038d7bead7a35cbda970cd.tar.bz2
chat-3e1fc76bf97703e730038d7bead7a35cbda970cd.zip
Fixing clustering problem (#4320)
Diffstat (limited to 'api/context.go')
-rw-r--r--api/context.go11
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) {