mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-10-28 06:09:49 +00:00
Mark connection as online on open socket
This commit is contained in:
1 parent
e8b48c8ed6
commit
0a1ddeb11e
1 file changed
+3
-4
@@ -36,6 +36,8 @@ export class Connection {
|
||||
}
|
||||
|
||||
function onSuccess() {
|
||||
this.state = this.update({ status: 'online' });
|
||||
|
||||
clean();
|
||||
resolve(socket);
|
||||
}
|
||||
@@ -68,10 +70,7 @@ export class Connection {
|
||||
}
|
||||
|
||||
private bindSocket() {
|
||||
this.state = this.update({
|
||||
status: 'online',
|
||||
nodes: new Map()
|
||||
});
|
||||
this.state = this.update({ nodes: new Map() });
|
||||
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