diff options
author | trinity-1686a <trinity@deuxfleurs.fr> | 2022-07-18 15:21:13 +0200 |
---|---|---|
committer | trinity-1686a <trinity@deuxfleurs.fr> | 2022-07-18 15:21:13 +0200 |
commit | cdff8ae1beab44a22d0eb0eb00c624e49971b6ca (patch) | |
tree | 1586e6042c03dd34336d4d2f2a79f1479f5e83ec /src/server.rs | |
parent | d3d18b8e8bde5fee81022fd050d5f4c114262fcf (diff) | |
download | netapp-cdff8ae1beab44a22d0eb0eb00c624e49971b6ca.tar.gz netapp-cdff8ae1beab44a22d0eb0eb00c624e49971b6ca.zip |
add detection of premature eos
Diffstat (limited to 'src/server.rs')
-rw-r--r-- | src/server.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server.rs b/src/server.rs index 86e5156..8075484 100644 --- a/src/server.rs +++ b/src/server.rs @@ -19,6 +19,7 @@ use tokio::select; use tokio::sync::{mpsc, watch}; use tokio_util::compat::*; +use futures::channel::mpsc::UnboundedReceiver; use futures::io::{AsyncReadExt, AsyncWriteExt}; use async_trait::async_trait; @@ -176,7 +177,7 @@ impl SendLoop for ServerConn {} #[async_trait] impl RecvLoop for ServerConn { - fn recv_handler(self: &Arc<Self>, id: RequestID, stream: AssociatedStream) { + fn recv_handler(self: &Arc<Self>, id: RequestID, stream: UnboundedReceiver<Packet>) { let resp_send = self.resp_send.load_full().unwrap(); let self2 = self.clone(); |