Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
5e6477720d | |||
bad8bf0688 |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@pushrocks/smartproxy",
|
||||
"version": "3.0.8",
|
||||
"version": "3.0.9",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@pushrocks/smartproxy",
|
||||
"version": "3.0.8",
|
||||
"version": "3.0.9",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/lik": "^6.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartproxy",
|
||||
"version": "3.0.8",
|
||||
"version": "3.0.9",
|
||||
"private": false,
|
||||
"description": "a proxy for handling high workloads of proxying",
|
||||
"main": "dist_ts/index.js",
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartproxy',
|
||||
version: '3.0.8',
|
||||
version: '3.0.9',
|
||||
description: 'a proxy for handling high workloads of proxying'
|
||||
}
|
||||
|
@ -256,26 +256,28 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
||||
this.httpsServer.headersTimeout = 65000;
|
||||
|
||||
this.httpsServer.on('connection', (connection: plugins.net.Socket) => {
|
||||
connection.setTimeout(120000);
|
||||
connection.setTimeout(10000);
|
||||
this.socketMap.add(connection);
|
||||
const cleanupConnection = () => {
|
||||
if (this.socketMap.checkForObject(connection)) {
|
||||
this.socketMap.remove(connection);
|
||||
connection.end();
|
||||
connection.removeAllListeners();
|
||||
connection.destroy();
|
||||
connection.end(() => {
|
||||
connection.destroy();
|
||||
connection.removeAllListeners();
|
||||
console.log(`socket successfully destroyed`);
|
||||
});
|
||||
}
|
||||
};
|
||||
connection.on('close', () => {
|
||||
connection.addListener('close', () => {
|
||||
cleanupConnection();
|
||||
});
|
||||
connection.on('error', () => {
|
||||
connection.addListener('error', () => {
|
||||
cleanupConnection();
|
||||
});
|
||||
connection.on('end', () => {
|
||||
connection.addListener('end', () => {
|
||||
cleanupConnection();
|
||||
});
|
||||
connection.on('timeout', () => {
|
||||
connection.addListener('timeout', () => {
|
||||
cleanupConnection();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user