diff options
author | Kyo Nguyen <canhlinh.lienson@gmail.com> | 2016-09-19 19:30:41 +0700 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-09-19 08:30:41 -0400 |
commit | 2ca751febff968ddad65a7f55bffde631392c093 (patch) | |
tree | 3532d88bf33b1a78e2327c0e074a0ea1d669d4e1 /store/sql_session_store.go | |
parent | 33eda94db33417c839499b1b3e0330a4fdd1de19 (diff) | |
download | chat-2ca751febff968ddad65a7f55bffde631392c093.tar.gz chat-2ca751febff968ddad65a7f55bffde631392c093.tar.bz2 chat-2ca751febff968ddad65a7f55bffde631392c093.zip |
Fix leaking goroutines in store calls (#3993). (#4021)
Diffstat (limited to 'store/sql_session_store.go')
-rw-r--r-- | store/sql_session_store.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/store/sql_session_store.go b/store/sql_session_store.go index 4ddc06302..9a377239a 100644 --- a/store/sql_session_store.go +++ b/store/sql_session_store.go @@ -36,7 +36,7 @@ func (me SqlSessionStore) CreateIndexesIfNotExists() { func (me SqlSessionStore) Save(session *model.Session) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -85,7 +85,7 @@ func (me SqlSessionStore) Save(session *model.Session) StoreChannel { func (me SqlSessionStore) Get(sessionIdOrToken string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -123,7 +123,7 @@ func (me SqlSessionStore) Get(sessionIdOrToken string) StoreChannel { } func (me SqlSessionStore) GetSessions(userId string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { @@ -166,7 +166,7 @@ func (me SqlSessionStore) GetSessions(userId string) StoreChannel { } func (me SqlSessionStore) Remove(sessionIdOrToken string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -184,7 +184,7 @@ func (me SqlSessionStore) Remove(sessionIdOrToken string) StoreChannel { } func (me SqlSessionStore) RemoveAllSessions() StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -202,7 +202,7 @@ func (me SqlSessionStore) RemoveAllSessions() StoreChannel { } func (me SqlSessionStore) PermanentDeleteSessionsByUser(userId string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -220,7 +220,7 @@ func (me SqlSessionStore) PermanentDeleteSessionsByUser(userId string) StoreChan } func (me SqlSessionStore) CleanUpExpiredSessions(userId string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -239,7 +239,7 @@ func (me SqlSessionStore) CleanUpExpiredSessions(userId string) StoreChannel { } func (me SqlSessionStore) UpdateLastActivityAt(sessionId string, time int64) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -258,7 +258,7 @@ func (me SqlSessionStore) UpdateLastActivityAt(sessionId string, time int64) Sto } func (me SqlSessionStore) UpdateRoles(userId, roles string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -276,7 +276,7 @@ func (me SqlSessionStore) UpdateRoles(userId, roles string) StoreChannel { } func (me SqlSessionStore) UpdateDeviceId(id string, deviceId string, expiresAt int64) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -294,7 +294,7 @@ func (me SqlSessionStore) UpdateDeviceId(id string, deviceId string, expiresAt i } func (me SqlSessionStore) AnalyticsSessionCount() StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} |