summaryrefslogtreecommitdiffstats
path: root/store/sql_command_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_command_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_command_store.go')
-rw-r--r--store/sql_command_store.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/store/sql_command_store.go b/store/sql_command_store.go
index 4332f1e93..410f9a287 100644
--- a/store/sql_command_store.go
+++ b/store/sql_command_store.go
@@ -39,7 +39,7 @@ func (s SqlCommandStore) CreateIndexesIfNotExists() {
}
func (s SqlCommandStore) Save(command *model.Command) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -72,7 +72,7 @@ func (s SqlCommandStore) Save(command *model.Command) StoreChannel {
}
func (s SqlCommandStore) Get(id string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -93,7 +93,7 @@ func (s SqlCommandStore) Get(id string) StoreChannel {
}
func (s SqlCommandStore) GetByTeam(teamId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -114,7 +114,7 @@ func (s SqlCommandStore) GetByTeam(teamId string) StoreChannel {
}
func (s SqlCommandStore) Delete(commandId string, time int64) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -132,7 +132,7 @@ func (s SqlCommandStore) Delete(commandId string, time int64) StoreChannel {
}
func (s SqlCommandStore) PermanentDeleteByUser(userId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -150,7 +150,7 @@ func (s SqlCommandStore) PermanentDeleteByUser(userId string) StoreChannel {
}
func (s SqlCommandStore) Update(cmd *model.Command) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -171,7 +171,7 @@ func (s SqlCommandStore) Update(cmd *model.Command) StoreChannel {
}
func (s SqlCommandStore) AnalyticsCommandCount(teamId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}