File tree Expand file tree Collapse file tree
connect_disconnect_client/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,12 +148,9 @@ pub(crate) async fn dispatch() {
148148}
149149
150150async fn wait_for_all ( test_counter : & std:: sync:: Arc < TestCounter > ) {
151+ // wasm/web callbacks run on the JS event loop, so this wait must stay async.
151152 #[ cfg( target_arch = "wasm32" ) ]
152- {
153- // wasm/web callbacks run on the JS event loop, so this wait must stay async.
154- test_counter. wait_for_all_async ( ) . await ;
155- return ;
156- }
153+ test_counter. wait_for_all_async ( ) . await ;
157154
158155 #[ cfg( not( target_arch = "wasm32" ) ) ]
159156 test_counter. wait_for_all ( ) ;
Original file line number Diff line number Diff line change @@ -66,12 +66,10 @@ impl TestCounter {
6666 }
6767
6868 pub async fn wait_for_all_async ( & self ) {
69+ // wasm/web test clients run callbacks on a single-threaded event loop,
70+ // so waiting must be async to allow callback tasks to make progress.
6971 #[ cfg( target_arch = "wasm32" ) ]
70- {
71- // wasm/web test clients run callbacks on a single-threaded event loop,
72- // so waiting must be async to allow callback tasks to make progress.
73- self . wait_for_all_wasm_async ( ) . await ;
74- }
72+ self . wait_for_all_wasm_async ( ) . await ;
7573
7674 #[ cfg( not( target_arch = "wasm32" ) ) ]
7775 self . wait_for_all_native ( ) ;
You can’t perform that action at this time.
0 commit comments