diff options
author | Corey Hulen <corey@hulen.com> | 2018-04-27 10:38:40 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2018-04-27 10:38:40 -0700 |
commit | 2acbc77d78456d7ba76ceb687b18985d7d92f814 (patch) | |
tree | 2cdc14c2df3ff3ad1d6e3a48928162b5b7bb4286 /app/web_hub.go | |
parent | 7abd6176e99d3f82711af51f8d75b3142ab73758 (diff) | |
download | chat-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.go | 1 |
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 |