Trying a better disconnect event

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-12 19:44:37 +01:00
parent 0df26727da
commit f337ad3197
2 changed files with 12 additions and 1 deletions

View File

@@ -374,6 +374,13 @@ module.exports = function() {
List.left_channel(coll, guid, short_id, in_list, socket, false);
});
socket.on("left_channel", function(msg) {
if(msg.hasOwnProperty("channel") && msg.channel != "" && typeof(msg.channel) == "string") {
coll = msg.channel;
List.left_channel(coll, guid, short_id, in_list, socket, false);
}
})
socket.on('reconnect_failed', function()
{
List.left_channel(coll, guid, short_id, in_list, socket, false);