diff options
author | Corey Hulen <corey@hulen.com> | 2017-08-22 10:20:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 10:20:54 -0700 |
commit | b0e367b19249e72748e719b7ff69671db3656e25 (patch) | |
tree | a0a53d33033f2830b7b53abbdb89ed8f2a8f6203 /store | |
parent | 1ce079d2d04442fb91485e88cbda67ebf260a9e8 (diff) | |
download | chat-b0e367b19249e72748e719b7ff69671db3656e25.tar.gz chat-b0e367b19249e72748e719b7ff69671db3656e25.tar.bz2 chat-b0e367b19249e72748e719b7ff69671db3656e25.zip |
Fixing race in update channel (#7269)
* Fixing race in update channel
* Switching to struct copy
Diffstat (limited to 'store')
-rw-r--r-- | store/sql_channel_store.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/store/sql_channel_store.go b/store/sql_channel_store.go index db9c2c1f4..690b1c176 100644 --- a/store/sql_channel_store.go +++ b/store/sql_channel_store.go @@ -405,7 +405,7 @@ func (s SqlChannelStore) get(id string, master bool, allowFromCache bool) StoreC if metrics != nil { metrics.IncrementMemCacheHitCounter("Channel") } - result.Data = cacheItem.(*model.Channel) + result.Data = (cacheItem.(*model.Channel)).DeepCopy() storeChannel <- result close(storeChannel) return |