Skip to content

Commit 49f2cf0

Browse files
committed
[WIP]: remove block_on on current runtime
1 parent eb9b803 commit 49f2cf0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mithril-common/src/test_utils/test_http_server.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ where
6060
{
6161
//Spawn new runtime in thread to prevent reactor execution context conflict
6262
thread::spawn(move || {
63-
let rt = runtime::Builder::new_multi_thread()
63+
let rt = runtime::Builder::new_current_thread()
6464
.enable_all()
6565
.build()
6666
.expect("new rt");
@@ -78,8 +78,8 @@ where
7878
);
7979
thread::Builder::new()
8080
.name(thread_name)
81-
.spawn(move || {
82-
rt.block_on(server);
81+
.spawn(async move || {
82+
server.await;
8383
let _ = panic_tx.send(());
8484
})
8585
.expect("thread spawn");

0 commit comments

Comments
 (0)