From 2acbc77d78456d7ba76ceb687b18985d7d92f814 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Fri, 27 Apr 2018 10:38:40 -0700 Subject: MM-10375 Fixing connected socket count (#8682) * Fixing connected socket count * Adding unit test --- app/web_hub.go | 1 + 1 file changed, 1 insertion(+) (limited to 'app/web_hub.go') 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 -- cgit v1.2.3-1-g7c22