fix: add shell creation timeout and improve error handling #489

Merged
ZacharyZcR merged 1 commits from fix/connection-loop into dev-1.10.1 2026-01-12 07:30:13 +00:00
ZacharyZcR commented 2026-01-11 11:25:46 +00:00 (Migrated from github.com)

Summary

  • Add 15-second timeout for shell creation to prevent silent failures
  • Improve error messages when connection closes during shell initialization
  • Add logging for shell creation start, timeout, and close events
  • Call cleanupSSH when shell creation fails with error

Root cause: When SSH connection succeeds but shell creation fails (server rejects shell request or doesn't respond), the frontend receives no notification and enters a reconnection loop until max attempts reached.

Changes:

  1. shellTimeout - If shell callback not received within 15s, send error and cleanup
  2. sshConn.on("close") - Detect close during shell init and send specific error message
  3. Added cleanupSSH() call on shell error to properly close connection

Related to #385

## Summary - Add 15-second timeout for shell creation to prevent silent failures - Improve error messages when connection closes during shell initialization - Add logging for shell creation start, timeout, and close events - Call cleanupSSH when shell creation fails with error **Root cause**: When SSH connection succeeds but shell creation fails (server rejects shell request or doesn't respond), the frontend receives no notification and enters a reconnection loop until max attempts reached. **Changes**: 1. `shellTimeout` - If shell callback not received within 15s, send error and cleanup 2. `sshConn.on("close")` - Detect close during shell init and send specific error message 3. Added `cleanupSSH()` call on shell error to properly close connection Related to #385
Sign in to join this conversation.