From 8d318dca28df7f697920d657eec138db1195d705 Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Wed, 3 Feb 2021 11:02:26 +0000 Subject: [PATCH] fix(core): update --- ts/smartproxy.classes.proxyworker.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ts/smartproxy.classes.proxyworker.ts b/ts/smartproxy.classes.proxyworker.ts index b7d0adf..cb27074 100644 --- a/ts/smartproxy.classes.proxyworker.ts +++ b/ts/smartproxy.classes.proxyworker.ts @@ -225,10 +225,24 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g= this.httpsServer.keepAliveTimeout = 61000; this.httpsServer.headersTimeout = 65000; - this.httpsServer.on('connection', (connection) => { + this.httpsServer.on('connection', (connection: plugins.net.Socket) => { + connection.setTimeout(120000); this.socketMap.add(connection); connection.on('close', () => { this.socketMap.remove(connection); + connection.destroy(); + }); + connection.on('error', () => { + this.socketMap.remove(connection); + connection.destroy(); + }); + connection.on('end', () => { + this.socketMap.remove(connection); + connection.destroy(); + }); + connection.on('timeout', () => { + this.socketMap.remove(connection); + connection.destroy(); }); });