websocket 关闭时日志输出

This commit is contained in:
2024-10-01 10:33:44 +08:00
parent 02fe8147c9
commit 708028c02f

View File

@@ -66,6 +66,7 @@ class MyWs {
}
close(){
if (this.ws && this.ws.readyState == 1) {
console.log("客户端 连接已关闭")
this.ws.close()
}
}