This commit is contained in:
Nikolay Kim 2025-03-16 11:29:07 +01:00
parent 6ff78925c2
commit 9870c7a779
3 changed files with 6 additions and 11 deletions

View file

@ -45,7 +45,7 @@ ntex-util = { path = "ntex-util" }
ntex-compio = { path = "ntex-compio" }
ntex-tokio = { path = "ntex-tokio" }
ntex-neon = { git = "git@github.com:ntex-rs/neon.git" }
ntex-neon = { git = "https://github.com/ntex-rs/neon.git" }
[workspace.dependencies]
async-task = "4.5.0"

View file

@ -228,8 +228,7 @@ mod tests {
#[ntex::test]
async fn test_connect() {
let server = ntex::server::test_server(|| {
ntex_service::fn_service(|_| async {
Ok::<_, ()>(()) })
ntex_service::fn_service(|_| async { Ok::<_, ()>(()) })
});
let srv = Connector::default().tag("T").memory_pool(PoolId::P5);

View file

@ -163,11 +163,7 @@ impl<T> Handler for StreamOpsHandler<T> {
});
if item.io.is_some() && result.is_pending() {
log::debug!(
"{}: want write {:?}",
item.context.tag(),
item.fd,
);
log::debug!("{}: want write {:?}", item.context.tag(), item.fd,);
self.inner.api.register(item.fd, id, Interest::Writable);
}
}
@ -217,10 +213,10 @@ fn close(id: usize, fd: RawFd, api: &DriverApi) -> ntex_rt::JoinHandle<io::Resul
impl<T> StreamCtl<T> {
pub(crate) fn close(self) -> impl Future<Output = io::Result<()>> {
let (context, io, fd) =
self.with(|streams| (streams[self.id].context.clone(), streams[self.id].io.take(), streams[self.id].fd));
let (io, fd) =
self.with(|streams| (streams[self.id].io.take(), streams[self.id].fd));
let fut = if let Some(io) = io {
log::debug!("{}: Closing ({}), {:?}", context.tag(), self.id, fd);
log::debug!("Closing ({}), {:?}", self.id, fd);
std::mem::forget(io);
Some(close(self.id, fd, &self.inner.api))
} else {