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_status_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_status_store.go')
-rw-r--r-- | store/sql_status_store.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/store/sql_status_store.go b/store/sql_status_store.go index 0915ced48..4d186a30e 100644 --- a/store/sql_status_store.go +++ b/store/sql_status_store.go @@ -36,7 +36,7 @@ func (s SqlStatusStore) CreateIndexesIfNotExists() { } func (s SqlStatusStore) SaveOrUpdate(status *model.Status) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -59,7 +59,7 @@ func (s SqlStatusStore) SaveOrUpdate(status *model.Status) StoreChannel { } func (s SqlStatusStore) Get(userId string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -90,7 +90,7 @@ func (s SqlStatusStore) Get(userId string) StoreChannel { } func (s SqlStatusStore) GetOnlineAway() StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -110,7 +110,7 @@ func (s SqlStatusStore) GetOnlineAway() StoreChannel { } func (s SqlStatusStore) GetOnline() StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -130,7 +130,7 @@ func (s SqlStatusStore) GetOnline() StoreChannel { } func (s SqlStatusStore) GetAllFromTeam(teamId string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -152,7 +152,7 @@ func (s SqlStatusStore) GetAllFromTeam(teamId string) StoreChannel { } func (s SqlStatusStore) ResetAll() StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -169,7 +169,7 @@ func (s SqlStatusStore) ResetAll() StoreChannel { } func (s SqlStatusStore) GetTotalActiveUsersCount() StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -190,7 +190,7 @@ func (s SqlStatusStore) GetTotalActiveUsersCount() StoreChannel { } func (s SqlStatusStore) UpdateLastActivityAt(userId string, lastActivityAt int64) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} |