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_preference_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_preference_store.go')
-rw-r--r-- | store/sql_preference_store.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/store/sql_preference_store.go b/store/sql_preference_store.go index f6a3b64dc..e20226ce6 100644 --- a/store/sql_preference_store.go +++ b/store/sql_preference_store.go @@ -56,7 +56,7 @@ func (s SqlPreferenceStore) DeleteUnusedFeatures() { } func (s SqlPreferenceStore) Save(preferences *model.Preferences) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -178,7 +178,7 @@ func (s SqlPreferenceStore) update(transaction *gorp.Transaction, preference *mo } func (s SqlPreferenceStore) Get(userId string, category string, name string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -207,7 +207,7 @@ func (s SqlPreferenceStore) Get(userId string, category string, name string) Sto } func (s SqlPreferenceStore) GetCategory(userId string, category string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -235,7 +235,7 @@ func (s SqlPreferenceStore) GetCategory(userId string, category string) StoreCha } func (s SqlPreferenceStore) GetAll(userId string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -262,7 +262,7 @@ func (s SqlPreferenceStore) GetAll(userId string) StoreChannel { } func (s SqlPreferenceStore) PermanentDeleteByUser(userId string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -280,7 +280,7 @@ func (s SqlPreferenceStore) PermanentDeleteByUser(userId string) StoreChannel { } func (s SqlPreferenceStore) IsFeatureEnabled(feature, userId string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -305,7 +305,7 @@ func (s SqlPreferenceStore) IsFeatureEnabled(feature, userId string) StoreChanne } func (s SqlPreferenceStore) Delete(userId, category, name string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} |