revoke된 세션 처리 추가
This commit is contained in:
@ -591,14 +591,8 @@ func (ws *WebsocketHandler) mainLoop(ctx context.Context) {
|
||||
} else if ws.sessionConsumer.IsRevoked(c.sender.Accid) {
|
||||
c.Conn.MakeWriter().WriteControl(websocket.CloseMessage, unauthdata, time.Time{})
|
||||
} else {
|
||||
sk := session.AccountToSessionKey(c.sender.Accid)
|
||||
auth, _ := ws.sessionConsumer.Query(sk)
|
||||
if auth.Account != c.sender.Accid {
|
||||
c.Conn.MakeWriter().WriteControl(websocket.CloseMessage, unauthdata, time.Time{})
|
||||
} else {
|
||||
entireConns[c.sender.Accid.Hex()] = c
|
||||
go ws.ClientConnected(c)
|
||||
}
|
||||
entireConns[c.sender.Accid.Hex()] = c
|
||||
go ws.ClientConnected(c)
|
||||
}
|
||||
|
||||
case accid := <-ws.forceCloseChan:
|
||||
|
||||
Reference in New Issue
Block a user