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