fix(core): update
This commit is contained in:
parent
5e6477720d
commit
2f0fad999a
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/smartproxy',
|
name: '@pushrocks/smartproxy',
|
||||||
version: '3.0.9',
|
version: '3.0.10',
|
||||||
description: 'a proxy for handling high workloads of proxying'
|
description: 'a proxy for handling high workloads of proxying'
|
||||||
}
|
}
|
||||||
|
@ -258,9 +258,11 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
|||||||
this.httpsServer.on('connection', (connection: plugins.net.Socket) => {
|
this.httpsServer.on('connection', (connection: plugins.net.Socket) => {
|
||||||
connection.setTimeout(10000);
|
connection.setTimeout(10000);
|
||||||
this.socketMap.add(connection);
|
this.socketMap.add(connection);
|
||||||
|
console.log(`added connection. now ${this.socketMap.getArray().length} sockets connected.`);
|
||||||
const cleanupConnection = () => {
|
const cleanupConnection = () => {
|
||||||
if (this.socketMap.checkForObject(connection)) {
|
if (this.socketMap.checkForObject(connection)) {
|
||||||
this.socketMap.remove(connection);
|
this.socketMap.remove(connection);
|
||||||
|
console.log(`removed connection. ${this.socketMap.getArray().length} sockets remaining.`);
|
||||||
connection.end(() => {
|
connection.end(() => {
|
||||||
connection.destroy();
|
connection.destroy();
|
||||||
connection.removeAllListeners();
|
connection.removeAllListeners();
|
||||||
@ -268,16 +270,16 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
connection.addListener('close', () => {
|
connection.on('close', () => {
|
||||||
cleanupConnection();
|
cleanupConnection();
|
||||||
});
|
});
|
||||||
connection.addListener('error', () => {
|
connection.on('error', () => {
|
||||||
cleanupConnection();
|
cleanupConnection();
|
||||||
});
|
});
|
||||||
connection.addListener('end', () => {
|
connection.on('end', () => {
|
||||||
cleanupConnection();
|
cleanupConnection();
|
||||||
});
|
});
|
||||||
connection.addListener('timeout', () => {
|
connection.on('timeout', () => {
|
||||||
cleanupConnection();
|
cleanupConnection();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user