File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ impl Association {
430
430
// read from the underlying transport. We do this because the
431
431
// user data is passed to the reassembly queue without
432
432
// copying.
433
- log:: debug!( "[{}] recving {} bytes" , name, n) ;
433
+ log:: debug!( "[{}] receiving {} bytes" , name, n) ;
434
434
let inbound = Bytes :: from ( buffer[ ..n] . to_vec ( ) ) ;
435
435
bytes_received. fetch_add ( n, Ordering :: SeqCst ) ;
436
436
@@ -468,6 +468,9 @@ impl Association {
468
468
' outer: while !done. load ( Ordering :: Relaxed ) {
469
469
//log::debug!("[{}] gather_outbound begin", name);
470
470
let ( packets, continue_loop) = {
471
+ // Yielding here fixes a deadlock that crops up when requestor and responder are
472
+ // using the same tokio event loop as in examples/data=channels-flow-control
473
+ tokio:: task:: yield_now ( ) . await ;
471
474
let mut ai = association_internal. lock ( ) . await ;
472
475
ai. gather_outbound ( ) . await
473
476
} ;
You can’t perform that action at this time.
0 commit comments