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.
This commit is contained in:
Jesse Hallam
2019-01-09 13:14:09 -05:00
committed by Christopher Speller
parent df076b457a
commit fa6f7f3a62

View File

@@ -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:
}
}