v1.8.2: session management hardening

- Fix infinite reconnect loop in terminal (_send_to_shell guard)
- Safe language switch: disconnect + reconnect instead of object transplant
- Improved SFTP reconnect flow with proper validation
- Add log.debug to all silent exception handlers in ssh_client

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chrome-storm-c442
2026-02-24 02:38:27 -05:00
parent bae7a916f2
commit 1a7b075cca
6 changed files with 36 additions and 35 deletions

View File

@@ -142,9 +142,8 @@ class TerminalTab(ctk.CTkFrame):
session = self._session # local ref for thread safety
if session and session.connected:
session.send(data)
elif self._current_alias and not self._intentional_disconnect:
# Session dead — trigger reconnect
self._reconnect_count = 0
elif self._current_alias and not self._intentional_disconnect and self._reconnect_count == 0:
# Session dead, no reconnect in progress — trigger one attempt
self._on_disconnected()
def _on_resize(self, cols: int, rows: int):