mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-11-09 09:07:06 +00:00
Resubscribe on reconnect
This commit is contained in:
1 parent
b311cc4d93
commit
2d14c27d9e
2 files changed
+7
-1
No files matched your search
@@ -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