Skip to content

Commit 846a546

Browse files
committed
fix(driver,poll): clear events before poll
1 parent 876423e commit 846a546

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

compio-driver/src/poll/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ impl Driver {
367367
if self.poll_blocking() {
368368
return Ok(());
369369
}
370+
self.events.clear();
370371
self.poll.wait(&mut self.events, timeout)?;
371372
if self.events.is_empty() && timeout.is_some() {
372373
return Err(io::Error::from_raw_os_error(libc::ETIMEDOUT));

0 commit comments

Comments
 (0)