From fa6f7f3a625b7c48d01bafa2c70d22ae66a4173b Mon Sep 17 00:00:00 2001 From: Jesse Hallam Date: Wed, 9 Jan 2019 13:14:09 -0500 Subject: [PATCH] MM-13678: fix web hub deadlock (#10081) The websocket hub, on stopping, closes all associated websocket connections, and each connection in turn tries to unregister itself with the hub, but this naturally creates a deadlock. This PR reverts the line commented (incorretly...) at https://github.com/mattermost/mattermost-server/pull/9863/files#r235583929. --- app/web_hub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/web_hub.go b/app/web_hub.go index 8427576362..4a594eaa2c 100644 --- a/app/web_hub.go +++ b/app/web_hub.go @@ -359,7 +359,7 @@ func (h *Hub) Register(webConn *WebConn) { func (h *Hub) Unregister(webConn *WebConn) { select { case h.unregister <- webConn: - case <-h.didStop: + case <-h.stop: } }