summaryrefslogtreecommitdiffstats
path: root/store/sql_channel_store.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-08-21 09:00:23 -0700
committerCorey Hulen <corey@hulen.com>2015-08-21 09:00:23 -0700
commit1ba694626128870698a6e011047ed899f5f90ba4 (patch)
treec49dd9fd25517457215f2e893b65a8760daba3a7 /store/sql_channel_store.go
parentddcdcc3e2c85efbfd1d91d69c0f5c0af7c7cb1c7 (diff)
parente4b66c3ff41bcac47f026151a7cb1b19b1217672 (diff)
downloadchat-1ba694626128870698a6e011047ed899f5f90ba4.tar.gz
chat-1ba694626128870698a6e011047ed899f5f90ba4.tar.bz2
chat-1ba694626128870698a6e011047ed899f5f90ba4.zip
Merge pull request #430 from mattermost/fixing-build
Fixing race condition
Diffstat (limited to 'store/sql_channel_store.go')
-rw-r--r--store/sql_channel_store.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go
index cf34f2847..a7577e645 100644
--- a/store/sql_channel_store.go
+++ b/store/sql_channel_store.go
@@ -4,6 +4,7 @@
package store
import (
+ "fmt"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
)
@@ -153,8 +154,10 @@ func (s SqlChannelStore) extraUpdated(channel *model.Channel) StoreChannel {
channel.ExtraUpdated()
- if count, err := s.GetMaster().Update(channel); err != nil || count != 1 {
+ if count, err := s.GetMaster().Update(channel); err != nil {
result.Err = model.NewAppError("SqlChannelStore.extraUpdated", "Problem updating members last updated time", "id="+channel.Id+", "+err.Error())
+ } else if count != 1 {
+ result.Err = model.NewAppError("SqlChannelStore.extraUpdated", "Problem updating members last updated time", fmt.Sprintf("id=%v, count=%v", channel.Id, count))
}
storeChannel <- result