summaryrefslogtreecommitdiffstats
path: root/store/sql_recovery_store.go
diff options
context:
space:
mode:
authorKyo Nguyen <canhlinh.lienson@gmail.com>2016-09-19 19:30:41 +0700
committerJoram Wilander <jwawilander@gmail.com>2016-09-19 08:30:41 -0400
commit2ca751febff968ddad65a7f55bffde631392c093 (patch)
tree3532d88bf33b1a78e2327c0e074a0ea1d669d4e1 /store/sql_recovery_store.go
parent33eda94db33417c839499b1b3e0330a4fdd1de19 (diff)
downloadchat-2ca751febff968ddad65a7f55bffde631392c093.tar.gz
chat-2ca751febff968ddad65a7f55bffde631392c093.tar.bz2
chat-2ca751febff968ddad65a7f55bffde631392c093.zip
Fix leaking goroutines in store calls (#3993). (#4021)
Diffstat (limited to 'store/sql_recovery_store.go')
-rw-r--r--store/sql_recovery_store.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/store/sql_recovery_store.go b/store/sql_recovery_store.go
index 80c86c67c..c43b9bbfa 100644
--- a/store/sql_recovery_store.go
+++ b/store/sql_recovery_store.go
@@ -29,7 +29,7 @@ func (s SqlPasswordRecoveryStore) CreateIndexesIfNotExists() {
func (s SqlPasswordRecoveryStore) SaveOrUpdate(recovery *model.PasswordRecovery) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -60,7 +60,7 @@ func (s SqlPasswordRecoveryStore) SaveOrUpdate(recovery *model.PasswordRecovery)
func (s SqlPasswordRecoveryStore) Delete(userId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -78,7 +78,7 @@ func (s SqlPasswordRecoveryStore) Delete(userId string) StoreChannel {
func (s SqlPasswordRecoveryStore) Get(userId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -100,7 +100,7 @@ func (s SqlPasswordRecoveryStore) Get(userId string) StoreChannel {
func (s SqlPasswordRecoveryStore) GetByCode(code string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}