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