mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-19 04:43:28 +02:00
Cleaner disconnect
This commit is contained in:
@@ -22,6 +22,7 @@ module.exports = function(socket) {
|
||||
|
||||
// prepare for errors
|
||||
socket.mcbot.on('error', function(error) {
|
||||
if (error.toString() === 'Error: write after end') return;
|
||||
socket.emit('buffer:error', error);
|
||||
socket.mcbot = null;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user