mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed client reconnect on server crash
This commit is contained in:
@@ -21,8 +21,10 @@ server.listen(port, function () {
|
||||
|
||||
io.on('connection', function(socket){
|
||||
|
||||
socket.on('echo', function(data, callback) {
|
||||
callback(data);
|
||||
socket.emit("get_list");
|
||||
|
||||
socket.on('ping', function() {
|
||||
socket.emit("ok");
|
||||
});
|
||||
|
||||
var coll;
|
||||
@@ -76,6 +78,7 @@ io.on('connection', function(socket){
|
||||
|
||||
socket.on('list', function(list)
|
||||
{
|
||||
console.log("list");
|
||||
in_list = true;
|
||||
list = list.split(',');
|
||||
coll = list[0].toLowerCase();
|
||||
|
||||
Reference in New Issue
Block a user