socket.io
Advanced tools
Comparing version 0.7.3 to 0.7.4
0.7.4 / 2011-06-30 | ||
================== | ||
* Fixed; only clear handlers if they were set. [level09] | ||
0.7.3 / 2011-06-30 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -18,3 +18,3 @@ | ||
exports.version = '0.7.3'; | ||
exports.version = '0.7.4'; | ||
@@ -21,0 +21,0 @@ /** |
@@ -118,2 +118,4 @@ | ||
this.socket.on('drain', this.bound.drain); | ||
this.handlersSet = true; | ||
}; | ||
@@ -128,10 +130,12 @@ | ||
Transport.prototype.clearHandlers = function () { | ||
this.store.unsubscribe('disconnect-force:' + this.id); | ||
this.store.unsubscribe('heartbeat-clear:' + this.id); | ||
this.store.unsubscribe('dispatch:' + this.id); | ||
if (this.handlersSet) { | ||
this.store.unsubscribe('disconnect-force:' + this.id); | ||
this.store.unsubscribe('heartbeat-clear:' + this.id); | ||
this.store.unsubscribe('dispatch:' + this.id); | ||
this.socket.removeListener('end', this.bound.end); | ||
this.socket.removeListener('close', this.bound.close); | ||
this.socket.removeListener('error', this.bound.error); | ||
this.socket.removeListener('drain', this.bound.drain); | ||
this.socket.removeListener('end', this.bound.end); | ||
this.socket.removeListener('close', this.bound.close); | ||
this.socket.removeListener('error', this.bound.error); | ||
this.socket.removeListener('drain', this.bound.drain); | ||
} | ||
}; | ||
@@ -138,0 +142,0 @@ |
{ | ||
"name": "socket.io" | ||
, "version": "0.7.3" | ||
, "version": "0.7.4" | ||
, "description": "Realtime apps made cross-browser & easy with a WebSocket-like API" | ||
@@ -5,0 +5,0 @@ , "homepage": "http://socket.io" |
300606
7337