Close any remaining connections once the tui exits
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 6m1s

This commit is contained in:
2025-04-20 21:21:07 +02:00
parent 3e726c713f
commit 78bc46c56b

View File

@@ -330,6 +330,26 @@ impl russh::server::Handler for Handler {
Ok(session.channel_success(channel)?)
}
async fn channel_close(
&mut self,
channel: ChannelId,
session: &mut Session,
) -> Result<(), Self::Error> {
if let Some(pty_channel) = self.pty_channel
&& pty_channel == channel
{
debug!("Pty channel closed");
session.disconnect(
russh::Disconnect::ByApplication,
"Remaining active connections have been closed",
"EN",
)?;
}
Ok(())
}
async fn tcpip_forward(
&mut self,
address: &str,