]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix lightning-net-tokio sometimes dropping messages
authorTibo-lg <thibaut@cryptogarage.co.jp>
Wed, 17 Jan 2024 00:20:30 +0000 (09:20 +0900)
committerTibo-lg <thibaut@cryptogarage.co.jp>
Wed, 17 Jan 2024 00:24:49 +0000 (09:24 +0900)
lightning-net-tokio/src/lib.rs

index 1aa2cc25a13cc0772ee2e958da66aca602ce0eb4..be41a2401244f0bff743e44b9e7ec26482d95227 100644 (file)
@@ -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,
                                        }
                                },