Compare commits

..

6 Commits
0.7.3 ... 0.7.6

Author SHA1 Message Date
Guillermo Rauch
a483f9cafd Release 0.7.6 2011-06-30 15:32:22 -03:00
Guillermo Rauch
b43c82f3db Fixed general dispatching when a client has closed. 2011-06-30 14:03:43 -03:00
Guillermo Rauch
84f0099c1d Release 0.7.5 2011-06-30 12:57:44 -03:00
Guillermo Rauch
c6a883c8a9 Fixed dispatching to clients that are disconnected. 2011-06-30 12:56:42 -03:00
Guillermo Rauch
af2d9f285b Release 0.7.4 2011-06-30 12:48:00 -03:00
Guillermo Rauch
40c1f8da2b Fixed; only clear handlers if they were set. [level09] 2011-06-30 12:47:02 -03:00
6 changed files with 33 additions and 14 deletions

View File

@@ -1,4 +1,19 @@
0.7.6 / 2011-06-30
==================
* Fixed general dispatching when a client has closed.
0.7.5 / 2011-06-30
==================
* Fixed dispatching to clients that are disconnected.
0.7.4 / 2011-06-30
==================
* Fixed; only clear handlers if they were set. [level09]
0.7.3 / 2011-06-30
==================

View File

@@ -62,11 +62,7 @@ var io = sio.listen(app)
, nicknames = {};
io.set('transports', [
'websocket'
, 'flashsocket'
, 'htmlfile'
, 'xhr-polling'
, 'jsonp-polling'
]);
io.sockets.on('connection', function (socket) {

View File

@@ -326,6 +326,8 @@ Manager.prototype.onOpen = function (id) {
Manager.prototype.onDispatch = function (room, packet, volatile, exceptions) {
// go through the users who have pending buffers
for (var i = 0, l = this.closedA.length; i < l; i++) {
if (!this.roomClients[this.closedA[i]]) continue;
if (this.roomClients[this.closedA[i]][room]) {
if (!~exceptions.indexOf(this.closedA[i])) {
this.closed[this.closedA[i]].push(packet);
@@ -407,7 +409,9 @@ Manager.prototype.onClose = function (id) {
*/
Manager.prototype.onClientDispatch = function (id, packet) {
this.closed[id].push(packet);
if (this.closed[id]) {
this.closed[id].push(packet);
}
};
/**

View File

@@ -15,7 +15,7 @@ var client = require('socket.io-client');
* Version.
*/
exports.version = '0.7.3';
exports.version = '0.7.6';
/**
* Supported protocol version.

View File

@@ -115,6 +115,8 @@ Transport.prototype.setHandlers = function () {
this.socket.on('close', this.bound.close);
this.socket.on('error', this.bound.error);
this.socket.on('drain', this.bound.drain);
this.handlersSet = true;
};
/**
@@ -124,14 +126,16 @@ Transport.prototype.setHandlers = function () {
*/
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);
}
};
/**

View File

@@ -1,6 +1,6 @@
{
"name": "socket.io"
, "version": "0.7.3"
, "version": "0.7.6"
, "description": "Realtime apps made cross-browser & easy with a WebSocket-like API"
, "homepage": "http://socket.io"
, "keywords": ["websocket", "socket", "realtime", "socket.io", "comet", "ajax"]