Skip to content

Commit

Permalink
[minor] Fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Dec 20, 2022
1 parent 2dc2812 commit d412358
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/websocket.js
Expand Up @@ -282,7 +282,8 @@ class WebSocket extends EventEmitter {
if (this.readyState === WebSocket.CLOSED) return;
if (this.readyState === WebSocket.CONNECTING) {
const msg = 'WebSocket was closed before the connection was established';
return abortHandshake(this, this._req, msg);
abortHandshake(this, this._req, msg);
return;
}

if (this.readyState === WebSocket.CLOSING) {
Expand Down Expand Up @@ -477,7 +478,8 @@ class WebSocket extends EventEmitter {
if (this.readyState === WebSocket.CLOSED) return;
if (this.readyState === WebSocket.CONNECTING) {
const msg = 'WebSocket was closed before the connection was established';
return abortHandshake(this, this._req, msg);
abortHandshake(this, this._req, msg);
return;
}

if (this._socket) {
Expand Down

0 comments on commit d412358

Please sign in to comment.