Skip to content

Commit

Permalink
Merge pull request #58 from shy1132/main
Browse files Browse the repository at this point in the history
fix: check if unref exists before calling
  • Loading branch information
xhayper authored Jul 29, 2024
2 parents 58b12b1 + e60d41c commit a69604a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ export class Client extends (EventEmitter as new () => TypedEventEmitter<ClientE

reject(error);
}, 10e3);
timeout.unref();

if ('unref' in timeout) timeout.unref();

this.once("connected", () => {
this.connectionPromise = undefined;
Expand Down

0 comments on commit a69604a

Please sign in to comment.