summaryrefslogtreecommitdiffstats
path: root/store/sql_emoji_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_emoji_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_emoji_store.go')
-rw-r--r--store/sql_emoji_store.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/store/sql_emoji_store.go b/store/sql_emoji_store.go
index 45af85931..85fd1a80d 100644
--- a/store/sql_emoji_store.go
+++ b/store/sql_emoji_store.go
@@ -30,7 +30,7 @@ func (es SqlEmojiStore) CreateIndexesIfNotExists() {
}
func (es SqlEmojiStore) Save(emoji *model.Emoji) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -56,7 +56,7 @@ func (es SqlEmojiStore) Save(emoji *model.Emoji) StoreChannel {
}
func (es SqlEmojiStore) Get(id string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -84,7 +84,7 @@ func (es SqlEmojiStore) Get(id string) StoreChannel {
}
func (es SqlEmojiStore) GetByName(name string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -112,7 +112,7 @@ func (es SqlEmojiStore) GetByName(name string) StoreChannel {
}
func (es SqlEmojiStore) GetAll() StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -139,7 +139,7 @@ func (es SqlEmojiStore) GetAll() StoreChannel {
}
func (es SqlEmojiStore) Delete(id string, time int64) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}