Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove the assertion #136

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions net/poll/src/reactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,12 @@ impl<Id: PeerId> nakamoto_net::Reactor<Id> for Reactor<net::TcpStream, Id> {
}
popol::Waker::reset(ev.source).ok();

// Nb. This assert has triggered once, but I wasn't available
// to reproduce it.
debug_assert!(!commands.is_empty());
// Nb. This should not happen, but it has been reported
// a few times. So we try to log a warning message and
// see how often this occurs.
if commands.is_empty() {
log::warn!(target: "poll", "waken up by waker received without commands");
}

for cmd in commands.try_iter() {
service.command_received(cmd);
Expand Down
Loading