Exit the loop if the client wants to disconnect; fixes #30
This commit is contained in:
parent
1506e22458
commit
5ccb32f338
6 changed files with 46 additions and 7 deletions
|
|
@ -48,6 +48,9 @@ var main = io.of('').on('connection', function(socket) {
|
|||
fn(payload);
|
||||
}
|
||||
});
|
||||
socket.on('wait_with_disconnect', function() {
|
||||
socket.emit('wait_with_disconnect_response');
|
||||
});
|
||||
});
|
||||
|
||||
var chat = io.of('/chat').on('connection', function (socket) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue