Browse files

Make these 2 tests work both on 0.4 and 0.6

  • Loading branch information...
1 parent 66ac425 commit 204576c0067166bb914ea0d2710cbee04f30fb2a @rauchg rauchg committed Feb 26, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/transports.websocket.test.js
View
4 test/transports.websocket.test.js
@@ -131,7 +131,7 @@ module.exports = {
var url = '/socket.io/' + sio.protocol + '/websocket/' + sid;
var req = cl.get(url, {headers: headers}, function (res, data) {});
var closed = false;
- req.socket.on('close', function() {
+ (req.socket || req).on('close', function() {
if (closed) return;
closed = true;
notConnected.should.be.true;
@@ -169,7 +169,7 @@ module.exports = {
var url = '/socket.io/' + sio.protocol + '/websocket/' + sid;
var req = cl.get(url, {headers: headers}, function (res, data) {});
var closed = false;
- req.socket.on('close', function() {
+ (req.socket || req).on('close', function() {
if (closed) return;
closed = true;
notConnected.should.be.true;

0 comments on commit 204576c

Please sign in to comment.