Skip to content

Commit

Permalink
Fix more test failures
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed Jan 13, 2024
1 parent aedcf45 commit 26cbf3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sources/ping/iocp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,8 @@ impl EventSource for PingSource {
let poll_state = match &mut counter.poll_state {
Some(ps) => ps,
None => {
return Err(super::PingError(Box::new(io::Error::from(
io::ErrorKind::NotFound,
))));
// We were deregistered; remove ourselves from the list.
return Ok(crate::PostAction::Remove);
}
};

Expand All @@ -121,6 +120,7 @@ impl EventSource for PingSource {
poll_state.packet.event().key,
token
);
return Ok(PostAction::Continue);
}

// Tell if we are registered.
Expand All @@ -132,7 +132,7 @@ impl EventSource for PingSource {
}

// Stop looping if all of the Ping's have been dropped.
let action = if Arc::strong_count(&self.state) == 1 {
let action = if Arc::strong_count(&self.state) <= 1 {
crate::PostAction::Remove
} else {
crate::PostAction::Continue
Expand Down

0 comments on commit 26cbf3a

Please sign in to comment.