fix(core): update
This commit is contained in:
parent
e9239ed978
commit
384943f697
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartproxy',
|
||||
version: '3.0.24',
|
||||
version: '3.0.25',
|
||||
description: 'a proxy for handling high workloads of proxying'
|
||||
}
|
||||
|
@ -201,7 +201,6 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
});
|
||||
req.on('timeout', () => {
|
||||
request.end();
|
||||
request.destroy();
|
||||
})
|
||||
}
|
||||
);
|
||||
@ -227,8 +226,8 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
});
|
||||
response.on('timeout', () => {
|
||||
res.end();
|
||||
res.destroy();
|
||||
});
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
@ -273,25 +272,19 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
cleanUp();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
this.httpsServer.keepAliveTimeout = 61000;
|
||||
this.httpsServer.headersTimeout = 65000;
|
||||
|
||||
this.httpsServer.on('connection', (connection: plugins.net.Socket) => {
|
||||
connection.setTimeout(60000);
|
||||
this.socketMap.add(connection);
|
||||
console.log(`added connection. now ${this.socketMap.getArray().length} sockets connected.`);
|
||||
const cleanupConnection = () => {
|
||||
if (this.socketMap.checkForObject(connection)) {
|
||||
this.socketMap.remove(connection);
|
||||
console.log(`removed connection. ${this.socketMap.getArray().length} sockets remaining.`);
|
||||
connection.end();
|
||||
connection.destroy();
|
||||
console.log(`socket successfully destroyed.`);
|
||||
plugins.smartdelay.delayFor(10000).then(() => {
|
||||
connection.removeAllListeners();
|
||||
})
|
||||
}
|
||||
};
|
||||
connection.on('close', () => {
|
||||
@ -303,9 +296,6 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
connection.on('end', () => {
|
||||
cleanupConnection();
|
||||
});
|
||||
connection.on('timeout', () => {
|
||||
cleanupConnection();
|
||||
});
|
||||
});
|
||||
|
||||
this.httpsServer.listen(this.options.port);
|
||||
|
Loading…
Reference in New Issue
Block a user