Skip to content

Commit

Permalink
Fix #163. Stop reconnection logic on UA.stop()
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillan committed Sep 26, 2013
1 parent 7cb8cde commit bb935c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ Transport.prototype = {
*/
disconnect: function() {
if(this.ws) {
// Clear reconnectTimer
window.clearTimeout(this.reconnectTimer);

this.closed = true;
console.log(LOG_PREFIX +'closing WebSocket ' + this.server.ws_uri);
this.ws.close();
Expand Down

0 comments on commit bb935c4

Please sign in to comment.