From: Tibo-lg Date: Wed, 17 Jan 2024 00:20:30 +0000 (+0900) Subject: Fix lightning-net-tokio sometimes dropping messages X-Git-Tag: v0.0.120~4^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=4cd0e6a391ce9d4c9cb3379b842797f9e80a8791;p=rust-lightning Fix lightning-net-tokio sometimes dropping messages --- diff --git a/lightning-net-tokio/src/lib.rs b/lightning-net-tokio/src/lib.rs index 1aa2cc25a..be41a2401 100644 --- a/lightning-net-tokio/src/lib.rs +++ b/lightning-net-tokio/src/lib.rs @@ -502,6 +502,9 @@ impl peer_handler::SocketDescriptor for SocketDescriptor { written_len += res; if written_len == data.len() { return written_len; } }, + Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => { + continue; + } Err(_) => return written_len, } },