Commit 2e871326 authored by nanahira's avatar nanahira

update client timeout

parent fa0e9f97
...@@ -997,10 +997,8 @@ net.createServer (client) -> ...@@ -997,10 +997,8 @@ net.createServer (client) ->
return return
client.on 'timeout', ()-> client.on 'timeout', ()->
if !client.server
return
unless settings.modules.reconnect.enabled and (disconnect_list[CLIENT_get_authorize_key(client)] or client.had_new_reconnection) unless settings.modules.reconnect.enabled and (disconnect_list[CLIENT_get_authorize_key(client)] or client.had_new_reconnection)
client.server.destroy() client.destroy()
return return
server.on 'close', (had_error) -> server.on 'close', (had_error) ->
......
...@@ -1297,11 +1297,8 @@ ...@@ -1297,11 +1297,8 @@
} }
}); });
client.on('timeout', function() { client.on('timeout', function() {
if (!client.server) {
return;
}
if (!(settings.modules.reconnect.enabled && (disconnect_list[CLIENT_get_authorize_key(client)] || client.had_new_reconnection))) { if (!(settings.modules.reconnect.enabled && (disconnect_list[CLIENT_get_authorize_key(client)] || client.had_new_reconnection))) {
client.server.destroy(); client.destroy();
} }
}); });
server.on('close', function(had_error) { server.on('close', function(had_error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment