잘못된 호출 수정
This commit is contained in:
@ -297,7 +297,7 @@ func (ws *WebsocketHandler) mainLoop(ctx context.Context) {
|
||||
|
||||
defer func() {
|
||||
for _, conn := range entireConns {
|
||||
ws.Call(conn.sender, ClientDisconnected, nil)
|
||||
ws.ClientDisconnected(conn)
|
||||
conn.Close()
|
||||
}
|
||||
}()
|
||||
@ -459,11 +459,9 @@ func (ws *WebsocketHandler) mainLoop(ctx context.Context) {
|
||||
case c := <-ws.connInOutChan:
|
||||
if c.Conn == nil {
|
||||
delete(entireConns, c.sender.Accid.Hex())
|
||||
logger.Println("ClientDisconnected :", c.sender.Alias)
|
||||
go ws.ClientDisconnected(c)
|
||||
} else {
|
||||
entireConns[c.sender.Accid.Hex()] = c
|
||||
logger.Println("ClientConnected :", c.sender.Alias)
|
||||
go ws.ClientConnected(c)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user