Do not re-register WS connection if already authenticated (#6511)

This commit is contained in:
Joram Wilander
2017-05-30 21:35:21 -07:00
committed by Corey Hulen
parent f520aa1f4d
commit 0e4add96ae
+4
View File
@@ -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()