Try fixing ws
This commit is contained in:
parent
cce42995b9
commit
088d78d762
2 changed files with 6 additions and 1 deletions
|
@ -60,6 +60,11 @@ function EventReceiver(websocket, poller, channels, last_msg, onmessage) {
|
|||
this.websocket.onclose = function (event) {
|
||||
if (event.code != 1000 && receiver.onwsclose !== null)
|
||||
receiver.onwsclose(event);
|
||||
if (event.code == 1006) {
|
||||
setTimeout(function() {
|
||||
connect();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.websocket = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue