Skip to content

Commit

Permalink
fix: socket doesn't connect again after closing while connecting (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: Ahmed <[email protected]>
  • Loading branch information
bytemain and abdelmagied94 authored May 13, 2024
1 parent 87833b4 commit 9834faf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions reconnecting-websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ export default class ReconnectingWebSocket {
.then(url => {
// close could be called before creating the ws
if (this._closeCalled) {
this._connectLock = false;
return;
}
this._debug('connect', {url, protocols: this._protocols, options: this._options});
Expand Down

0 comments on commit 9834faf

Please sign in to comment.