Skip to content

Commit d412358

Browse files
committed
[minor] Fix nits
1 parent 2dc2812 commit d412358

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/websocket.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ class WebSocket extends EventEmitter {
282282
if (this.readyState === WebSocket.CLOSED) return;
283283
if (this.readyState === WebSocket.CONNECTING) {
284284
const msg = 'WebSocket was closed before the connection was established';
285-
return abortHandshake(this, this._req, msg);
285+
abortHandshake(this, this._req, msg);
286+
return;
286287
}
287288

288289
if (this.readyState === WebSocket.CLOSING) {
@@ -477,7 +478,8 @@ class WebSocket extends EventEmitter {
477478
if (this.readyState === WebSocket.CLOSED) return;
478479
if (this.readyState === WebSocket.CONNECTING) {
479480
const msg = 'WebSocket was closed before the connection was established';
480-
return abortHandshake(this, this._req, msg);
481+
abortHandshake(this, this._req, msg);
482+
return;
481483
}
482484

483485
if (this._socket) {

0 commit comments

Comments
 (0)