提交 f09c5fc1 编写于 作者: 雨爱无痕

Add print websocket error

上级 37c97364
......@@ -80,7 +80,10 @@ export class WebSocket {
static sentMsg(roomName: string, msg: string): void {
console.log(`send msg to room "${roomName}"`)
if (!WebSocket.conn) return
if (!WebSocket.conn) {
console.error("websocket conn miss")
return
}
WebSocket.conn.leaveAll().then(() =>
this.joinRoomAndSend(roomName, msg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册