Skip to content

Commit

Permalink
[fix] Fix duplicate identifier declaration (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
MyMomSaysIAmSpecial authored and darrachequesne committed May 10, 2017
1 parent 2354068 commit bceab01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 4 additions & 8 deletions index.js
Expand Up @@ -233,31 +233,27 @@ function adapter(uri, opts) {
var socket = this.nsp.connected[request.sid];
if (!socket) { return; }

function sendAck(){
socket.join(request.room, function(){
var response = JSON.stringify({
requestid: request.requestid
});

pub.publish(self.responseChannel, response);
}

socket.join(request.room, sendAck);
});
break;

case requestTypes.remoteLeave:

var socket = this.nsp.connected[request.sid];
if (!socket) { return; }

function sendAck(){
socket.leave(request.room, function(){
var response = JSON.stringify({
requestid: request.requestid
});

pub.publish(self.responseChannel, response);
}

socket.leave(request.room, sendAck);
});
break;

case requestTypes.remoteDisconnect:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -25,7 +25,7 @@
"expect.js": "0.3.1",
"ioredis": "2.5.0",
"mocha": "3.2.0",
"socket.io": "socketio/socket.io",
"socket.io-client": "socketio/socket.io-client"
"socket.io": "1.7.x",
"socket.io-client": "1.7.x"
}
}

0 comments on commit bceab01

Please sign in to comment.