Skip to content

Commit c137255

Browse files
committed
Wake reader future when we fail to flush socket buffer
1 parent cd0541b commit c137255

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning-net-tokio/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,9 @@ impl peer_handler::SocketDescriptor for SocketDescriptor {
443443
// pause read given we're now waiting on the remote end to ACK (and in
444444
// accordance with the send_data() docs).
445445
us.read_paused = true;
446+
// Further, to avoid any current pending read causing a `read_event` call, wake
447+
// up the read_waker and restart its loop.
448+
let _ = us.read_waker.try_send(());
446449
return written_len;
447450
},
448451
}

0 commit comments

Comments
 (0)