mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-01 20:07:39 +03:00
Fix operation cancelation handling for io-uring driver (#527)
This commit is contained in:
parent
5db953cea5
commit
ae5980cdd9
4 changed files with 11 additions and 2 deletions
|
@ -1,5 +1,9 @@
|
|||
# Changes
|
||||
|
||||
## [2.5.2] - 2025-03-14
|
||||
|
||||
* Fix operation cancelation handling for io-uring driver
|
||||
|
||||
## [2.5.1] - 2025-03-14
|
||||
|
||||
* Fix socket connect for io-uring driver
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "ntex-net"
|
||||
version = "2.5.1"
|
||||
version = "2.5.2"
|
||||
authors = ["ntex contributors <team@ntex.rs>"]
|
||||
description = "ntexwork utils for ntex framework"
|
||||
keywords = ["network", "framework", "async", "futures"]
|
||||
|
|
|
@ -118,10 +118,16 @@ impl<T> Handler for StreamOpsHandler<T> {
|
|||
Operation::Recv { id, buf, context } => {
|
||||
log::debug!("{}: Recv canceled {:?}", context.tag(), id,);
|
||||
context.release_read_buf(buf);
|
||||
if let Some(item) = storage.streams.get_mut(id) {
|
||||
item.rd_op.take();
|
||||
}
|
||||
}
|
||||
Operation::Send { id, buf, context } => {
|
||||
log::debug!("{}: Send canceled: {:?}", context.tag(), id);
|
||||
context.release_write_buf(buf);
|
||||
if let Some(item) = storage.streams.get_mut(id) {
|
||||
item.wr_op.take();
|
||||
}
|
||||
}
|
||||
Operation::Nop | Operation::Close { .. } => {}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,6 @@ async fn run<T>(ctl: StreamCtl<T>, context: IoContext) {
|
|||
|
||||
let write = match context.poll_write_ready(cx) {
|
||||
Poll::Ready(WriteStatus::Ready) => {
|
||||
log::debug!("{}: write ready", context.tag());
|
||||
ctl.resume_write();
|
||||
Poll::Pending
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue