Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Sep 10, 2024
1 parent a2569b4 commit cf6797a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ntex-glommio/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ use std::{any, future::poll_fn, future::Future, io, pin::Pin};
use futures_lite::future::FutureExt;
use futures_lite::io::{AsyncRead, AsyncWrite};
use ntex_bytes::{Buf, BufMut, BytesVec};
use ntex_io::{
types, Handle, IoStream, ReadContext, ReadStatus, WriteContext, WriteStatus,
};
use ntex_io::{types, Handle, IoStream, ReadContext, WriteContext, WriteStatus};
use ntex_util::{ready, time::sleep, time::Sleep};

use crate::net_impl::{TcpStream, UnixStream};
Expand All @@ -16,7 +14,8 @@ impl IoStream for TcpStream {
let mut rio = ReadTask(self.clone());
glommio::spawn_local(async move {
read.handle(&mut rio).await;
});
})
.detach();
glommio::spawn_local(WriteTask::new(self.clone(), write)).detach();
Some(Box::new(self))
}
Expand All @@ -27,7 +26,8 @@ impl IoStream for UnixStream {
let mut rio = UnixReadTask(self.clone());
glommio::spawn_local(async move {
read.handle(&mut rio).await;
});
})
.detach();
glommio::spawn_local(UnixWriteTask::new(self, write)).detach();
None
}
Expand Down

0 comments on commit cf6797a

Please sign in to comment.