fix
This commit is contained in:
@@ -72,7 +72,12 @@ class MyWs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
send(obj) {
|
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(){
|
close(){
|
||||||
if (this.ws && this.ws.readyState == 1) {
|
if (this.ws && this.ws.readyState == 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user