Skip to content

Commit

Permalink
fix(stream): connecting errors not being handled correctly (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
microwavekonijn authored Dec 3, 2022
1 parent 5ec9b97 commit 465b4e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/census.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class CensusClient extends EventEmitter<ClientEvents> {
* Doom and destruction, WUHAHAHAHA!
*/
destroy(): void {
this.streamManager?.disconnect();
this.streamManager.disconnect();
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/stream/stream.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ export class StreamClient extends EventEmitter<StreamClientEvents> {
*/
private cleanupConnection(): void {
this.connection?.removeAllListeners();
this.connection?.on('error', () => null);
}

/**
Expand Down

0 comments on commit 465b4e6

Please sign in to comment.