Try fixing ws

This commit is contained in:
cuom1999 2022-05-18 13:39:20 -05:00
parent cce42995b9
commit 088d78d762
2 changed files with 6 additions and 1 deletions

View file

@ -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;

View file

@ -115,7 +115,7 @@ let META_HEADER = [
console.log('Navigated away');
return;
}
console.log('You probably should refresh?');
console.log('Refreshing ws');
};
return receiver;