This commit is contained in:
X1627315083
2024-11-11 17:28:24 +08:00
parent 89c1dafd41
commit 164ff73c7e

View File

@@ -72,7 +72,12 @@ class MyWs {
}
}
send(obj) {
this.ws.send(JSON.stringify(obj))
if(this.ws.readyState == 1){
this.ws.send(JSON.stringify(obj))
}else{
clearTimeout(this.sendPINGTime)
this.reconnection()
}
}
close(){
if (this.ws && this.ws.readyState == 1) {