mirror of
https://github.com/bitinflow/server.git
synced 2026-03-13 13:35:53 +00:00
handle engine.io websocket errors more gracefully
This commit is contained in:
@@ -218,6 +218,11 @@ module.exports = function(opt) {
|
|||||||
eio_sockets.push(socket);
|
eio_sockets.push(socket);
|
||||||
socket.send(JSON.stringify(stats));
|
socket.send(JSON.stringify(stats));
|
||||||
|
|
||||||
|
socket.on('error', function(err) {
|
||||||
|
log.error(err);
|
||||||
|
socket.close();
|
||||||
|
});
|
||||||
|
|
||||||
socket.on('close', function() {
|
socket.on('close', function() {
|
||||||
|
|
||||||
// remove from socket pool so no more updates are sent
|
// remove from socket pool so no more updates are sent
|
||||||
|
|||||||
Reference in New Issue
Block a user