fix(core): update
This commit is contained in:
		| @@ -3,6 +3,6 @@ | ||||
|  */ | ||||
| export const commitinfo = { | ||||
|   name: '@pushrocks/smartproxy', | ||||
|   version: '3.0.21', | ||||
|   version: '3.0.22', | ||||
|   description: 'a proxy for handling high workloads of proxying' | ||||
| } | ||||
|   | ||||
| @@ -201,6 +201,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g= | ||||
|             }); | ||||
|             req.on('timeout', () => { | ||||
|               request.end(); | ||||
|               request.destroy(); | ||||
|             }) | ||||
|           } | ||||
|         ); | ||||
| @@ -226,6 +227,7 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g= | ||||
|         }); | ||||
|         response.on('timeout', () => { | ||||
|           res.end(); | ||||
|           res.destroy(); | ||||
|         }); | ||||
|       } | ||||
|     ); | ||||
| @@ -278,26 +280,20 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g= | ||||
|  | ||||
|     this.httpsServer.on('connection', (connection: plugins.net.Socket) => { | ||||
|       connection.setTimeout(60000); | ||||
|       let destroyed = false; | ||||
|       this.socketMap.add(connection); | ||||
|       console.log(`added connection. now ${this.socketMap.getArray().length} sockets connected.`); | ||||
|       const destroyConnection = () => { | ||||
|         if (!destroyed) { | ||||
|           destroyed = true; | ||||
|           connection.destroy(); | ||||
|           console.log(`socket successfully destroyed.`); | ||||
|         } | ||||
|       } | ||||
|       const cleanupConnection = () => { | ||||
|         if (this.socketMap.checkForObject(connection)) { | ||||
|           this.socketMap.remove(connection); | ||||
|           plugins.smartdelay.delayFor(200).then(() => { | ||||
|             destroyConnection(); | ||||
|           }); | ||||
|           console.log(`removed connection. ${this.socketMap.getArray().length} sockets remaining.`); | ||||
|           connection.end(() => { | ||||
|             destroyConnection(); | ||||
|           }); | ||||
|           connection.end(); | ||||
|           connection.destroy(); | ||||
|           console.log(`socket successfully destroyed.`); | ||||
|           /* plugins.smartdelay.delayFor(10000).then(() => { | ||||
|             connection.removeAllListeners(); | ||||
|           }) */ | ||||
|         } | ||||
|       }; | ||||
|       connection.on('close', () => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user