Implement connection timeout handling and improve connection cleanup in SmartProxy

This commit is contained in:
Juergen Kunz
2025-06-06 23:34:50 +00:00
parent 311691c2cc
commit 9aebcd488d
5 changed files with 604 additions and 6 deletions

View File

@ -1125,6 +1125,7 @@ export class RouteConnectionHandler {
const targetSocket = createSocketWithErrorHandler({
port: finalTargetPort,
host: finalTargetHost,
timeout: this.settings.connectionTimeout || 30000, // Connection timeout (default: 30s)
onError: (error) => {
// Connection failed - clean up everything immediately
// Check if connection record is still valid (client might have disconnected)