fix(core): update

This commit is contained in:
Philipp Kunz 2019-11-08 18:48:39 +01:00
parent f98c797ad8
commit d712270946
2 changed files with 10 additions and 0 deletions

View File

@ -112,6 +112,11 @@ export class SmartsocketClient {
});
// handle connection
this.socketConnection.socket.on('connect', async () => {
this.updateStatus('connected');
});
// handle disconnection and errors
this.socketConnection.socket.on('disconnect', async () => {
await this.disconnect();

View File

@ -68,6 +68,11 @@ export class SocketConnection {
// standard behaviour that is always true
allSocketConnections.add(this);
// handle connection
this.socket.on('connect', async () => {
this.updateStatus('connected');
});
this.socket.on('disconnect', async () => {
plugins.smartlog.defaultLogger.log(
'info',