fix to socket code
This commit is contained in:
@@ -87,13 +87,4 @@ io.on('connection', function (socket) {
|
||||
socket.on('disconnect', function() {
|
||||
console.log('Client disconnected: ' + socket.id);
|
||||
});
|
||||
|
||||
socket.on('error', function(err) {
|
||||
console.log('db error', err);
|
||||
if(err.code === 'PROTOCOL_CONNECTION_LOST') { // Connection to the MySQL server is usually
|
||||
handleDisconnect(); // lost due to either server restart, or a
|
||||
} else { // connnection idle timeout (the wait_timeout
|
||||
throw err; // server variable configures this)
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user