Compare commits

...

2 Commits

Author SHA1 Message Date
ad8c667dec 3.9.2 2025-02-21 23:33:16 +00:00
942e0649c8 fix(PortProxy): Improve timeout handling for port proxy connections 2025-02-21 23:33:15 +00:00
4 changed files with 16 additions and 4 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## 2025-02-21 - 3.9.2 - fix(PortProxy)
Improve timeout handling for port proxy connections
- Added console logging for both incoming and outgoing side timeouts in the PortProxy class.
- Updated the timeout event handlers to ensure proper cleanup of connections.
## 2025-02-21 - 3.9.1 - fix(dependencies)
Ensure correct ordering of dependencies and improve logging format.

View File

@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartproxy",
"version": "3.9.1",
"version": "3.9.2",
"private": false,
"description": "a proxy for handling high workloads of proxying",
"main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartproxy',
version: '3.9.1',
version: '3.9.2',
description: 'a proxy for handling high workloads of proxying'
}

View File

@ -279,8 +279,14 @@ export class PortProxy {
to.on('error', handleError('outgoing'));
socket.on('close', handleClose('incoming'));
to.on('close', handleClose('outgoing'));
socket.on('timeout', handleError('incoming'));
to.on('timeout', handleError('outgoing'));
socket.on('timeout', () => {
console.log(`Timeout on incoming side from ${remoteIP}`);
cleanupOnce();
});
to.on('timeout', () => {
console.log(`Timeout on outgoing side from ${remoteIP}`);
cleanupOnce();
});
socket.on('end', handleClose('incoming'));
to.on('end', handleClose('outgoing'));
};