From a83ed4c3fa8ed444d9ab29ce95cd3775d0d3e87f Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 14 Mar 2025 23:04:33 +0500 Subject: [PATCH] Fix op cancelation in poll driver --- ntex-net/src/rt_polling/driver.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ntex-net/src/rt_polling/driver.rs b/ntex-net/src/rt_polling/driver.rs index becc9aeb..b830fcca 100644 --- a/ntex-net/src/rt_polling/driver.rs +++ b/ntex-net/src/rt_polling/driver.rs @@ -156,6 +156,8 @@ impl Handler for StreamOpsHandler { if result.is_pending() { item.flags.insert(Flags::RD); self.inner.api.register(item.fd, id, Interest::Readable); + } else { + item.flags.remove(Flags::RD); } } Change::Writable => { @@ -170,6 +172,8 @@ impl Handler for StreamOpsHandler { if result.is_pending() { item.flags.insert(Flags::WR); self.inner.api.register(item.fd, id, Interest::Writable); + } else { + item.flags.remove(Flags::WR); } } Change::Error(err) => {