Skip to content

Commit

Permalink
fix(torture): don't use blocking recv anymore
Browse files Browse the repository at this point in the history
The PR downstack makes this workaround unnecessary.
  • Loading branch information
pepyakin committed Feb 21, 2025
1 parent d218790 commit 7f5988f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions torture/src/supervisor/comms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,7 @@ impl RequestResponse {
wr_stream.send(Envelope { reqno, message }).await?;
drop(wr_stream);

// TODO: Spawning a blocking task to handle the reception of the message
// in the one shot channel is a workaround to make it possible to handle
// large messages. Using the standard `timeout(self.shared.timeout, rx).await??;`
// does not work, it hangs when the expected value to be received is larger than 15KiB.
let message = timeout(
self.shared.timeout,
tokio::task::spawn_blocking(|| rx.blocking_recv()),
)
.await???;
let message = timeout(self.shared.timeout, rx).await??;

Ok(message)
}
Expand Down

0 comments on commit 7f5988f

Please sign in to comment.