mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Do not re-register WS connection if already authenticated (#6511)
This commit is contained in:
committed by
Corey Hulen
parent
f520aa1f4d
commit
0e4add96ae
@@ -42,6 +42,10 @@ func (wr *WebSocketRouter) ServeWebSocket(conn *WebConn, r *model.WebSocketReque
|
||||
}
|
||||
|
||||
if r.Action == model.WEBSOCKET_AUTHENTICATION_CHALLENGE {
|
||||
if conn.SessionToken != "" {
|
||||
return
|
||||
}
|
||||
|
||||
token, ok := r.Data["token"].(string)
|
||||
if !ok {
|
||||
conn.WebSocket.Close()
|
||||
|
||||
Reference in New Issue
Block a user