Files
Ehab Younes 5d5d8b1723 fix(agent/agentssh): report ssh disconnect when the connection closes (#32353)
Non-PTY SSH sessions keep their process running after the client leaves, so
the disconnect was only reported when that process exited and connection log
rows stayed "Ongoing".

- Report the disconnect with reason client_closed when the SSH connection
  closes, or when the handler returns, whichever comes first.
- Guard the report with sync.Once so it happens once and finishes before the
  handler returns.
- Keep non-PTY process lifetime unchanged (OpenSSH-compatible, #18519).
- Add TestSSHShutdownReason/ClientDisconnectWhileProcessRuns.

Closes CLIENT-1112
2026-11-20 13:04:43 +03:00
..
…