Skip to content

Commit

Permalink
Fix lightning-net-tokio sometimes dropping messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibo-lg committed Jan 17, 2024
1 parent ea5de93 commit 9c57564
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lightning-net-tokio/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,12 @@ impl peer_handler::SocketDescriptor for SocketDescriptor {
written_len += res;
if written_len == data.len() { return written_len; }
},
Err(_) => return written_len,
Err(ref e) if e.kind() == std::io::ErrorKind::WouldBlock => {
continue;
}
Err(_) => {
return written_len;
}
}
},
task::Poll::Ready(Err(_)) => return written_len,
Expand Down

0 comments on commit 9c57564

Please sign in to comment.