UI: improve offline detection (#14705)
This commit is contained in:
parent
5db2d5402c
commit
fcc00c54a3
1 changed files with 4 additions and 2 deletions
|
|
@ -61,8 +61,11 @@ export default {
|
|||
this.reload();
|
||||
}
|
||||
},
|
||||
offline: function () {
|
||||
offline: function (now, prev) {
|
||||
updateAuthStatus();
|
||||
if (now && !prev) {
|
||||
this.reconnect();
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -157,7 +160,6 @@ export default {
|
|||
this.ws.onclose = () => {
|
||||
console.log("websocket disconnected");
|
||||
window.app.setOffline();
|
||||
this.reconnect();
|
||||
};
|
||||
this.ws.onmessage = (evt) => {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue