mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-12 22:41:01 +00:00
Resubscribe on reconnect
This commit is contained in:
@@ -72,6 +72,12 @@ export class Connection {
|
||||
status: 'online',
|
||||
nodes: new Map()
|
||||
});
|
||||
|
||||
// Re-subscribe to previously selected chain
|
||||
if (this.state.subscribed) {
|
||||
this.subscribe(this.state.subscribed);
|
||||
}
|
||||
|
||||
this.socket.addEventListener('message', this.handleMessages);
|
||||
this.socket.addEventListener('close', this.handleDisconnect);
|
||||
this.socket.addEventListener('error', this.handleDisconnect);
|
||||
|
||||
Reference in New Issue
Block a user