Skip to content

Commit 4cd0e6a

Browse files
committed
Fix lightning-net-tokio sometimes dropping messages
1 parent ea5de93 commit 4cd0e6a

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
@@ -502,6 +502,9 @@ impl peer_handler::SocketDescriptor for SocketDescriptor {
502502
written_len += res;
503503
if written_len == data.len() { return written_len; }
504504
},
505+
Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => {
506+
continue;
507+
}
505508
Err(_) => return written_len,
506509
}
507510
},

0 commit comments

Comments
 (0)