summaryrefslogtreecommitdiffstats
path: root/app/web_hub.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2018-04-27 10:38:40 -0700
committerChristopher Speller <crspeller@gmail.com>2018-04-27 10:38:40 -0700
commit2acbc77d78456d7ba76ceb687b18985d7d92f814 (patch)
tree2cdc14c2df3ff3ad1d6e3a48928162b5b7bb4286 /app/web_hub.go
parent7abd6176e99d3f82711af51f8d75b3142ab73758 (diff)
downloadchat-2acbc77d78456d7ba76ceb687b18985d7d92f814.tar.gz
chat-2acbc77d78456d7ba76ceb687b18985d7d92f814.tar.bz2
chat-2acbc77d78456d7ba76ceb687b18985d7d92f814.zip
MM-10375 Fixing connected socket count (#8682)
* Fixing connected socket count * Adding unit test
Diffstat (limited to 'app/web_hub.go')
-rw-r--r--app/web_hub.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/web_hub.go b/app/web_hub.go
index c1c8cb7bb..971b03481 100644
--- a/app/web_hub.go
+++ b/app/web_hub.go
@@ -378,6 +378,7 @@ func (h *Hub) Start() {
atomic.StoreInt64(&h.connectionCount, int64(len(connections.All())))
case webCon := <-h.unregister:
connections.Remove(webCon)
+ atomic.StoreInt64(&h.connectionCount, int64(len(connections.All())))
if len(webCon.UserId) == 0 {
continue