Skip to content

Commit

Permalink
this changed
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Leggett <benjamin.leggett@solo.io>
  • Loading branch information
bleggett committed Apr 26, 2024
1 parent fcc845f commit 4622532
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/proxy/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,7 @@ mod test {
use hyper::{Request, Response};
use std::sync::atomic::AtomicU32;
use std::time::Duration;
use tokio::io::AsyncWriteExt;
use tokio::net::TcpListener;
use tokio::task::{self};
use tokio::time::sleep;
Expand Down Expand Up @@ -1397,9 +1398,9 @@ mod test {
tokio::task::spawn(async move {
match hyper::upgrade::on(req).await {
Ok(upgraded) => {
let (mut ri, mut wi) =
tokio::io::split(hyper_util::rt::TokioIo::new(upgraded));
tcp::handle_stream(tcp::Mode::ReadWrite, &mut ri, &mut wi).await;
let mut io = hyper_util::rt::TokioIo::new(upgraded);
io.write_all(b"poolsrv\n").await.unwrap();
tcp::handle_stream(tcp::Mode::ReadWrite, &mut io).await;
}
Err(e) => panic!("No upgrade {e}"),
}
Expand Down

0 comments on commit 4622532

Please sign in to comment.