From 04dbb34bb8471c6b64831859978f49909bc3d797 Mon Sep 17 00:00:00 2001 From: Benjamin Leggett Date: Thu, 25 Apr 2024 22:23:10 -0400 Subject: [PATCH] this changed Signed-off-by: Benjamin Leggett --- src/proxy/pool.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/proxy/pool.rs b/src/proxy/pool.rs index 8258dd50e..23f218127 100644 --- a/src/proxy/pool.rs +++ b/src/proxy/pool.rs @@ -649,6 +649,7 @@ mod test { use tokio::net::TcpListener; use tokio::task::{self}; use tokio::time::sleep; + use tokio::io::AsyncWriteExt; #[cfg(tokio_unstable)] use tracing::Instrument; @@ -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}"), }