fix to socket code

This commit is contained in:
Arjun Patel
2018-07-26 23:03:54 -07:00
parent 11c8a86322
commit 48a57a4416
-9
View File
@@ -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)
}
});
});