diff --git a/src/ipc.rs b/src/ipc.rs index d6de78bba..56664b9d2 100644 --- a/src/ipc.rs +++ b/src/ipc.rs @@ -355,9 +355,10 @@ pub enum Data { MouseMoveTime(i64), Authorize, Close, - // A newer authorized connection has taken this one's place. Ends the session like `Close` - // but sends the peer nothing: the peer that owned this one has already moved on, and the - // link it would be sent over is the very one that stopped working. + // A newer authorized connection has taken this one's place. Ends the superseded connection + // like `Close` - the session itself continues on the newer one - and sends the peer nothing: + // the peer has already moved on, and the link it would be sent over is the very one that + // stopped working. Displaced, #[cfg(windows)] SAS, diff --git a/src/server/connection.rs b/src/server/connection.rs index 81401d72b..f5e6066dd 100644 --- a/src/server/connection.rs +++ b/src/server/connection.rs @@ -7635,12 +7635,13 @@ mod test { let mine = key(7, "peer"); // Every kind displaces its own: a stale remote control or camera view keeps the capture - // loop waiting on it, and a stale transfer or tunnel holds its own resources. + // loop waiting on it, and a stale transfer, tunnel or terminal holds its own resources. for kind in [ AuthConnType::Remote, AuthConnType::ViewCamera, AuthConnType::FileTransfer, AuthConnType::PortForward, + AuthConnType::Terminal, ] { assert!( AuthedConnID::is_displaced(&conn(1, kind, mine.clone()), 2, kind, &mine), @@ -7661,6 +7662,7 @@ mod test { AuthConnType::FileTransfer, AuthConnType::PortForward, AuthConnType::ViewCamera, + AuthConnType::Terminal, ] { assert!( !AuthedConnID::is_displaced(