Skip to content

Commit

Permalink
Update devolutions-gateway/src/recording.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Benoît Cortier <[email protected]>
  • Loading branch information
irvingoujAtDevolution and CBenoit authored Oct 30, 2024
1 parent 1b37889 commit 7cf618f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions devolutions-gateway/src/recording.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,14 @@ where

let shutdown_signal = shutdown_signal.wait();
let copy_fut = io::copy(&mut client_stream, &mut file);
let recording_clone = recordings.clone();

let signal_loop = tokio::spawn(async move {
while flush_signal.recv().await.is_some() {
recording_clone.new_chunk_appended(session_id)?;
let signal_loop = tokio::spawn({
let recordings = recordings.clone();
async move {
while flush_signal.recv().await.is_some() {
recordings.new_chunk_appended(session_id)?;
}
Ok::<_, anyhow::Error>(())
}
Ok::<_, anyhow::Error>(())
});

let res = tokio::select! {
Expand Down

0 comments on commit 7cf618f

Please sign in to comment.