Skip to content

Commit

Permalink
Wake reader future when we fail to flush socket buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt committed Oct 6, 2021
1 parent cd0541b commit c137255
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lightning-net-tokio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,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;
},
}
Expand Down

0 comments on commit c137255

Please sign in to comment.