remoteDisconnect feature.#177
Merged
darrachequesne merged 5 commits intosocketio:masterfrom Jan 15, 2017
Merged
Conversation
index.js
Outdated
| var socket = this.nsp.connected[request.sid]; | ||
| if (!socket) { return; } | ||
|
|
||
| function sendAck(){ |
Member
There was a problem hiding this comment.
The sendAck function is useless here, isn't it?
Member
There was a problem hiding this comment.
Sorry, my comment wasn't clear enough! What I thought of was:
case requestTypes.remoteDisconnect:
var socket = this.nsp.connected[request.sid];
if (!socket) { return; }
socket.disconnect(request.close);
// the acknowledgement is still needed
var response = JSON.stringify({
requestid: request.requestid
});
pub.publish(self.responseChannel, response);
break;
Contributor
Author
There was a problem hiding this comment.
Hey, could you please check it again?
Member
|
Looks good to me! Could you please add a test, and a line in the README? |
Contributor
Author
|
I'm kinda new to git(hub) but I'll try. |
send acknowledgement in remoteDisconnect call.
Member
|
Thanks for that pull request! I added a test, to prevent future regressions. |
Contributor
Author
|
You're welcome! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please, check carefully before merging, because I'm not sure if I did it right. Thanks!