summaryrefslogtreecommitdiffstats
path: root/store/sql_team_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_team_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_team_store.go')
-rw-r--r--store/sql_team_store.go38
1 files changed, 19 insertions, 19 deletions
diff --git a/store/sql_team_store.go b/store/sql_team_store.go
index b9db80588..34a4a097d 100644
--- a/store/sql_team_store.go
+++ b/store/sql_team_store.go
@@ -49,7 +49,7 @@ func (s SqlTeamStore) CreateIndexesIfNotExists() {
}
func (s SqlTeamStore) Save(team *model.Team) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -89,7 +89,7 @@ func (s SqlTeamStore) Save(team *model.Team) StoreChannel {
func (s SqlTeamStore) Update(team *model.Team) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -130,7 +130,7 @@ func (s SqlTeamStore) Update(team *model.Team) StoreChannel {
func (s SqlTeamStore) UpdateDisplayName(name string, teamId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -149,7 +149,7 @@ func (s SqlTeamStore) UpdateDisplayName(name string, teamId string) StoreChannel
}
func (s SqlTeamStore) Get(id string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -175,7 +175,7 @@ func (s SqlTeamStore) Get(id string) StoreChannel {
}
func (s SqlTeamStore) GetByInviteId(inviteId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -204,7 +204,7 @@ func (s SqlTeamStore) GetByInviteId(inviteId string) StoreChannel {
}
func (s SqlTeamStore) GetByName(name string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -229,7 +229,7 @@ func (s SqlTeamStore) GetByName(name string) StoreChannel {
}
func (s SqlTeamStore) GetAll() StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -255,7 +255,7 @@ func (s SqlTeamStore) GetAll() StoreChannel {
}
func (s SqlTeamStore) GetTeamsByUserId(userId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -281,7 +281,7 @@ func (s SqlTeamStore) GetTeamsByUserId(userId string) StoreChannel {
}
func (s SqlTeamStore) GetAllTeamListing() StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -313,7 +313,7 @@ func (s SqlTeamStore) GetAllTeamListing() StoreChannel {
}
func (s SqlTeamStore) PermanentDelete(teamId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -330,7 +330,7 @@ func (s SqlTeamStore) PermanentDelete(teamId string) StoreChannel {
}
func (s SqlTeamStore) AnalyticsTeamCount() StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -349,7 +349,7 @@ func (s SqlTeamStore) AnalyticsTeamCount() StoreChannel {
}
func (s SqlTeamStore) SaveMember(member *model.TeamMember) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -390,7 +390,7 @@ func (s SqlTeamStore) SaveMember(member *model.TeamMember) StoreChannel {
}
func (s SqlTeamStore) UpdateMember(member *model.TeamMember) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -417,7 +417,7 @@ func (s SqlTeamStore) UpdateMember(member *model.TeamMember) StoreChannel {
}
func (s SqlTeamStore) GetMember(teamId string, userId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -442,7 +442,7 @@ func (s SqlTeamStore) GetMember(teamId string, userId string) StoreChannel {
}
func (s SqlTeamStore) GetMembers(teamId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -463,7 +463,7 @@ func (s SqlTeamStore) GetMembers(teamId string) StoreChannel {
}
func (s SqlTeamStore) GetTeamsForUser(userId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -484,7 +484,7 @@ func (s SqlTeamStore) GetTeamsForUser(userId string) StoreChannel {
}
func (s SqlTeamStore) RemoveMember(teamId string, userId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -502,7 +502,7 @@ func (s SqlTeamStore) RemoveMember(teamId string, userId string) StoreChannel {
}
func (s SqlTeamStore) RemoveAllMembersByTeam(teamId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}
@@ -520,7 +520,7 @@ func (s SqlTeamStore) RemoveAllMembersByTeam(teamId string) StoreChannel {
}
func (s SqlTeamStore) RemoveAllMembersByUser(userId string) StoreChannel {
- storeChannel := make(StoreChannel)
+ storeChannel := make(StoreChannel, 1)
go func() {
result := StoreResult{}