Skip to content

Commit

Permalink
fix: fixed error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sequoiar committed Jul 10, 2023
1 parent 9a3f5e9 commit 3e0be4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ function createWebSocketStream(ws, options) {
ws._receiver.on('drain', receiverOnDrain);
});
} else {
ws._receiver.removeAllListeners('drain');
ws._receiver.on('drain', receiverOnDrain);
if (ws && ws._receiver) ws._receiver.removeAllListeners('drain');
if (ws && ws._receiver) ws._receiver.on('drain', receiverOnDrain);
}

const duplex = new Duplex({
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wspp",
"version": "7.2.8",
"version": "7.2.9",
"description": "fork of wspp for work with node-httpp",
"keywords": [
"HyBi",
Expand Down

0 comments on commit 3e0be4c

Please sign in to comment.