From 2ca751febff968ddad65a7f55bffde631392c093 Mon Sep 17 00:00:00 2001 From: Kyo Nguyen Date: Mon, 19 Sep 2016 19:30:41 +0700 Subject: Fix leaking goroutines in store calls (#3993). (#4021) --- store/sql_system_store.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'store/sql_system_store.go') diff --git a/store/sql_system_store.go b/store/sql_system_store.go index 6ae350720..cb589e760 100644 --- a/store/sql_system_store.go +++ b/store/sql_system_store.go @@ -28,7 +28,7 @@ func (s SqlSystemStore) CreateIndexesIfNotExists() { func (s SqlSystemStore) Save(system *model.System) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -46,7 +46,7 @@ func (s SqlSystemStore) Save(system *model.System) StoreChannel { func (s SqlSystemStore) SaveOrUpdate(system *model.System) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -70,7 +70,7 @@ func (s SqlSystemStore) SaveOrUpdate(system *model.System) StoreChannel { func (s SqlSystemStore) Update(system *model.System) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -88,7 +88,7 @@ func (s SqlSystemStore) Update(system *model.System) StoreChannel { func (s SqlSystemStore) Get() StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} @@ -114,7 +114,7 @@ func (s SqlSystemStore) Get() StoreChannel { func (s SqlSystemStore) GetByName(name string) StoreChannel { - storeChannel := make(StoreChannel) + storeChannel := make(StoreChannel, 1) go func() { result := StoreResult{} -- cgit v1.2.3-1-g7c22