mirror of
https://github.com/jwetzell/showbridge-webui.git
synced 2026-09-07 22:38:59 +00:00
reconnect to ws when closed
This commit is contained in:
@@ -34,6 +34,10 @@ export class EventsService {
|
|||||||
|
|
||||||
this.socket.onclose = () => {
|
this.socket.onclose = () => {
|
||||||
this.status.set('closed');
|
this.status.set('closed');
|
||||||
|
// TODO(jwetzell): this could probably be better done
|
||||||
|
setTimeout(() => {
|
||||||
|
this.reload();
|
||||||
|
}, 2000);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.socket.onerror = (error) => {
|
this.socket.onerror = (error) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user