aboutsummaryrefslogtreecommitdiff
path: root/src/recv.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-26 12:11:48 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-26 12:11:48 +0200
commitb55f61c38b01da01314d99ced543aba713dbd2a9 (patch)
tree401e95bbb9db8e0454dc31f1af01ef41139c87c8 /src/recv.rs
parentbdf7d4731dcd2e9b523758272fdc41b374044a9f (diff)
downloadnetapp-b55f61c38b01da01314d99ced543aba713dbd2a9.tar.gz
netapp-b55f61c38b01da01314d99ced543aba713dbd2a9.zip
Fix things going wrong when sending chan is closed
Diffstat (limited to 'src/recv.rs')
-rw-r--r--src/recv.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/recv.rs b/src/recv.rs
index cba42cb..4d1047b 100644
--- a/src/recv.rs
+++ b/src/recv.rs
@@ -3,7 +3,7 @@ use std::sync::Arc;
use async_trait::async_trait;
use bytes::Bytes;
-use log::trace;
+use log::*;
use futures::AsyncReadExt;
use tokio::sync::mpsc;
@@ -59,6 +59,11 @@ pub(crate) trait RecvLoop: Sync + 'static {
{
let mut streams: HashMap<RequestID, Sender> = HashMap::new();
loop {
+ debug!(
+ "Receiving: {:?}",
+ streams.iter().map(|(id, _)| id).collect::<Vec<_>>()
+ );
+
let mut header_id = [0u8; RequestID::BITS as usize / 8];
match read.read_exact(&mut header_id[..]).await {
Ok(_) => (),