fix(connection): onClose -> onDidDispose protocol

This commit is contained in:
Joe Previte 2021-02-26 12:55:04 -07:00
parent 52acb50ed7
commit 1bf3036597
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ export abstract class Connection {
export class ManagementConnection extends Connection { export class ManagementConnection extends Connection {
public constructor(protected protocol: Protocol, token: string) { public constructor(protected protocol: Protocol, token: string) {
super(protocol, token); super(protocol, token);
protocol.onClose(() => this.dispose()); // Explicit close. protocol.onDidDispose(() => this.dispose()); // Explicit close.
protocol.onSocketClose(() => this.setOffline()); // Might reconnect. protocol.onSocketClose(() => this.setOffline()); // Might reconnect.
} }