Skip to content

SMC-728 - pull latest upstream master; add error handler in WebSocketRequest.js - #8

Merged
cordellcalitz merged 5 commits into
masterfrom
SMC-728
Aug 14, 2020
Merged

cordellcalitz merged 5 commits into
masterfrom
SMC-728

Conversation

@cordellcalitz

Copy link
Copy Markdown

No description provided.

@csampsonza csampsonza left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to drop the fork. But we need protection against EPIPE, .on('error' ... , and we have some pong logic - fix for connections being dropped when inbound queue causes us to miss pongs before keepalive timeout

Comment thread CHANGELOG.md
*Released 2015-07-22*

* Incremented and re-published to work around an aborted npm publish of v1.0.20.
* Incrememnted and re-published to work around an aborted npm publish of v1.0.20.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new typo: 'Incremented'

Comment thread lib/WebSocketRequest.js Outdated
// Watch for the underlying TCP socket closing before we call accept
this._socketIsClosing = false;
this._socketCloseHandler = this._handleSocketCloseBeforeAccept.bind(this);
this._sockeErrorHandler = this._handleSocketErrorBeforeAccept.bind(this);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add missing 't' into _sockeErrorHandler

Comment thread lib/WebSocketRequest.js
this._removeSocketCloseListeners();
};

WebSocketRequest.prototype._handleSocketErrorBeforeAccept = function(err) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does this only apply to 'BeforeAccept'? are the error handlers overwritten later?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I don't really understand it very well. It looks like this file only accepts or rejects the requests, then it gets handled on another level. So we add the error handler within this scope and remove it once it is accepted or rejected. I assume if an error can happen somewhere outside of this file that might cause an uncaught exception we would have to handle it there

@JensEggers JensEggers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment on typos, but if these came in from upstream merge it's prob best to leave them alone

@cordellcalitz
cordellcalitz merged commit 333a282 into master Aug 14, 2020
@cordellcalitz
cordellcalitz deleted the SMC-728 branch August 14, 2020 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants