fix h2 ping test

This commit is contained in:
Rob Ede 2021-11-05 01:28:26 +00:00
parent 811bc957ef
commit 59b8c25bdc
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
1 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ async fn h2_ping_pong() -> io::Result<()> {
let join = std::thread::spawn(move || { let join = std::thread::spawn(move || {
actix_rt::System::new().block_on(async move { actix_rt::System::new().block_on(async move {
let handle = Server::build() let srv = Server::build()
.disable_signals() .disable_signals()
.workers(1) .workers(1)
.listen("h2_ping_pong", lst, || { .listen("h2_ping_pong", lst, || {
@ -24,9 +24,9 @@ async fn h2_ping_pong() -> io::Result<()> {
})? })?
.run(); .run();
tx.send(handle.clone()).unwrap(); tx.send(srv.handle()).unwrap();
handle.await srv.await
}) })
}); });