Skip to content

Commit

Permalink
stop trying to reconnect once connection has been closed by application
Browse files Browse the repository at this point in the history
  • Loading branch information
grs committed Dec 8, 2017
1 parent 950c8fb commit 2f7cdba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ EndpointState.prototype.close = function () {
};

EndpointState.prototype.disconnected = function () {
var was_initialised = this.initialised;
var was_open = this.local_open;
this.init();
this.initialised = was_initialised;
if (was_open) {
this.open();
} else {
Expand Down

0 comments on commit 2f7cdba

Please sign in to comment.