Skip to content

Commit

Permalink
fix: correctly set current socket connection after a reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Sep 24, 2024
1 parent 7982e94 commit ac3df29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ export class WmClient {
// Attempt to reconnect if not manually closed.
if (!this._isManuallyClosed) {
setTimeout(
() => this._socketPromise === this._createSocket(),
() => (this._socketPromise = this._createSocket()),
this._options?.reconnectInterval ??
this.DEFAULT_RECONNECT_INTERVAL,
);
Expand Down

0 comments on commit ac3df29

Please sign in to comment.