mirror of
https://github.com/bitinflow/server.git
synced 2026-03-13 13:35:53 +00:00
don't wait for server close to clear timeout
This commit is contained in:
5
proxy.js
5
proxy.js
@@ -39,7 +39,10 @@ var Proxy = function(opt, cb) {
|
|||||||
// user has 5 seconds to connect before their slot is given up
|
// user has 5 seconds to connect before their slot is given up
|
||||||
function maybe_tcp_close() {
|
function maybe_tcp_close() {
|
||||||
clearTimeout(conn_timeout);
|
clearTimeout(conn_timeout);
|
||||||
conn_timeout = setTimeout(client_server.close.bind(client_server), 5000);
|
conn_timeout = setTimeout(function() {
|
||||||
|
client_server.close();
|
||||||
|
clearTimeout(conn_timeout);
|
||||||
|
}, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
maybe_tcp_close();
|
maybe_tcp_close();
|
||||||
|
|||||||
Reference in New Issue
Block a user