Skip to content

Commit

Permalink
Fix connection close when Transport timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
datso committed Feb 6, 2017
1 parent 1d48f43 commit eef1957
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ SockJS.prototype._connect = function() {
SockJS.prototype._transportTimeout = function() {
debug('_transportTimeout');
if (this.readyState === SockJS.CONNECTING) {
if (this._transport) {
this._transport.close();
}

this._transportClose(2007, 'Transport timed out');
}
};
Expand Down

1 comment on commit eef1957

@lpinca
Copy link
Contributor

@lpinca lpinca commented on eef1957 May 29, 2018

Choose a reason for hiding this comment

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

@brycekahle can you please cut a new release with this patch? We would prefer to not float this on Primus. See primus/primus#635.

Please sign in to comment.