Skip to content

Commit

Permalink
Minor accuracy improvements to server documentation (#346)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
belak authored Sep 19, 2024
1 parent 3a33a76 commit 6df962d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions russh/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ async fn start_reading<R: AsyncRead + Unpin>(

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

/// Run a single connection to completion.
/// Start a single connection in the background.
pub async fn run_stream<H, R>(
config: Arc<Config>,
mut stream: R,
Expand Down

0 comments on commit 6df962d

Please sign in to comment.