Skip to content

Commit 6df962d

Browse files
authored
Minor accuracy improvements to server documentation (#346)
As far as I can tell, the `RunningSession` returned by `run_stream` is only a handle to a running task, and will not kill the task when dropped as the documentation implies.
1 parent 3a33a76 commit 6df962d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

russh/src/server/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ async fn start_reading<R: AsyncRead + Unpin>(
638638

639639
/// An active server session returned by [run_stream].
640640
///
641-
/// Implements [Future] and needs to be awaited to allow the session to run.
641+
/// Implements [Future] and can be awaited to wait for the session to finish.
642642
pub struct RunningSession<H: Handler> {
643643
handle: Handle,
644644
join: JoinHandle<Result<(), H::Error>>,
@@ -665,7 +665,7 @@ impl<H: Handler> Future for RunningSession<H> {
665665
}
666666
}
667667

668-
/// Run a single connection to completion.
668+
/// Start a single connection in the background.
669669
pub async fn run_stream<H, R>(
670670
config: Arc<Config>,
671671
mut stream: R,

0 commit comments

Comments
 (0)