X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-net-tokio%2Fsrc%2Flib.rs;h=fc7b260e41bf1c6d54d8df15436cf865f64629ed;hb=f90983180eac9950256d47cb5eb77353f19fec6b;hp=cee7c5c1b982882244cdb33a5d82d7abb0c8eadc;hpb=97711aef96556637b3f8b4336b688fbfcf4c2beb;p=rust-lightning diff --git a/lightning-net-tokio/src/lib.rs b/lightning-net-tokio/src/lib.rs index cee7c5c1..fc7b260e 100644 --- a/lightning-net-tokio/src/lib.rs +++ b/lightning-net-tokio/src/lib.rs @@ -465,6 +465,9 @@ impl peer_handler::SocketDescriptor for SocketDescriptor { // pause read given we're now waiting on the remote end to ACK (and in // accordance with the send_data() docs). us.read_paused = true; + // Further, to avoid any current pending read causing a `read_event` call, wake + // up the read_waker and restart its loop. + let _ = us.read_waker.try_send(()); return written_len; }, }