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_audit_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_audit_store.go')
-rw-r--r-- | store/sql_audit_store.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/store/sql_audit_store.go b/store/sql_audit_store.go index 78e875a74..7e8fa74e4 100644 --- a/store/sql_audit_store.go +++ b/store/sql_audit_store.go @@ -33,7 +33,7 @@ func (s SqlAuditStore) CreateIndexesIfNotExists() { func (s SqlAuditStore) Save(audit *model.Audit) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -56,7 +56,7 @@ func (s SqlAuditStore) Save(audit *model.Audit) StoreChannel { func (s SqlAuditStore) Get(user_id string, limit int) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -93,7 +93,7 @@ func (s SqlAuditStore) Get(user_id string, limit int) StoreChannel { func (s SqlAuditStore) PermanentDeleteByUser(userId string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} |