Skip to content

Commit

Permalink
Merge branch 'master' into compression
Browse files Browse the repository at this point in the history
Conflicts:
	package.json
  • Loading branch information
nkzawa committed Jan 21, 2015
2 parents d11e17c + ba530a4 commit 99b709c
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 11 deletions.
13 changes: 13 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@

1.5.1 / 2015-01-19
==================

* no change on this release
* package: bump `engine.io-client`

1.5.0 / 2015-01-18
==================

* package: bump `engine.io-parser`
* polling: correctly abort the ongoing data request when closing [lpinca]
* add cert-related client tests [rase-]

1.4.3 / 2014-11-21
==================

Expand Down
4 changes: 1 addition & 3 deletions lib/transports/polling.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ Polling.prototype.onDataRequest = function (req, res) {
cleanup();
}

req.abort = cleanup;
req.on('close', onClose);
req.on('data', onData);
req.on('end', onEnd);
Expand Down Expand Up @@ -366,9 +365,8 @@ Polling.prototype.doClose = function (fn) {
debug('closing');

if (this.dataReq) {
// FIXME: should we do this?
debug('aborting ongoing data request');
this.dataReq.abort();
this.dataReq.destroy();
}

if (this.writable) {
Expand Down
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{
"name": "engine.io",
"version": "1.4.3",
"version": "1.5.1",
"description": "The realtime engine behind Socket.IO. Provides the foundation of a bidirectional connection between client and server",
"main": "./lib/engine.io",
"author": "Guillermo Rauch <[email protected]>",
"homepage": "https://github.com/LearnBoost/engine.io",
"repository": {
"type": "git",
"url": "git://github.com/LearnBoost/engine.io.git"
},
"contributors": [
{ "name": "Eugen Dueck", "web": "https://github.com/EugenDueck" },
{ "name": "Afshin Mehrabani", "web": "https://github.com/afshinm" },
Expand All @@ -18,20 +14,20 @@
"dependencies": {
"debug": "1.0.3",
"ws": "0.6.5",
"engine.io-parser": "1.1.0",
"engine.io-parser": "1.2.1",
"base64id": "0.1.0",
"accepts": "1.1.4"
},
"devDependencies": {
"mocha": "1.12.0",
"expect.js": "0.2.0",
"superagent": "0.15.4",
"engine.io-client": "automattic/engine.io-client#e352db",
"engine.io-client": "1.5.1",
"s": "0.1.1"
},
"scripts": { "test" : "make test" },
"repository": {
"type": "git",
"url": "[email protected]:LearnBoost/engine.io.git"
"url": "[email protected]:Automattic/engine.io.git"
}
}
21 changes: 21 additions & 0 deletions test/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,27 @@ describe('server', function () {
});
});

it('should abort the polling data request if it is ' +
'in progress', function (done) {
var engine = listen({ transports: [ 'polling' ] }, function (port) {
var socket = new eioc.Socket('http://localhost:%d'.s(port));

engine.on('connection', function (conn) {
var onDataRequest = conn.transport.onDataRequest;
conn.transport.onDataRequest = function (req, res) {
engine.httpServer.close(done);
onDataRequest.call(conn.transport, req, res);
req.removeAllListeners();
conn.close();
};
});

socket.on('open', function () {
socket.send('test');
});
});
});

// tests https://github.com/LearnBoost/engine.io-client/issues/207
// websocket test, transport error
it('should trigger transport close before open for ws', function(done){
Expand Down

0 comments on commit 99b709c

Please sign in to comment.