• Stefy Lanza (nextime / spora )'s avatar
    Improve error handling in handle_tunnel_data for SSH client disconnections · cd3ecbb1
    Stefy Lanza (nextime / spora ) authored
    - Enhanced send() error handling with specific errno checking
    - Differentiated between recoverable and fatal socket errors
    - EPIPE/ECONNRESET errors now properly mark tunnel as inactive
    - EAGAIN/EWOULDBLOCK errors are treated as recoverable (non-blocking)
    - Other unexpected errors still mark tunnel as inactive
    - Added detailed debug logging for different error conditions
    - Prevented premature tunnel termination on temporary socket issues
    - Improved robustness of SSH client connection handling
    - Better error recovery for network socket state fluctuations
    - Fixed issue where SSH client disconnections caused tunnel instability
    - Enhanced connection state management during SSH protocol exchange
    - Resolved intermittent connection failures during data transmission
    - Improved reliability of WebSocket-to-SSH data forwarding mechanism
    - Fixed critical bug causing SSH sessions to terminate on socket errors
    - Added comprehensive error classification for socket operations
    - Enhanced debugging visibility for connection troubleshooting
    - Implemented more resilient error recovery strategies
    - Fixed race conditions in socket error handling
    - Resolved timing-sensitive socket validation issues
    - Improved overall stability of SSH tunneling connections
    cd3ecbb1
tunnel.c 33.4 KB