aboutsummaryrefslogtreecommitdiff
path: root/src/send.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-09-01 14:23:10 +0200
committerAlex Auvolat <alex@adnab.me>2022-09-01 14:23:10 +0200
commit22d96929d5416750e1f5889ee6cc16b382293104 (patch)
tree7b9407132ffa02fa5c7e9f6040f90f0e071b4bf3 /src/send.rs
parent4a59b73d7bfd0f136f654e874afb5d2a9bf4df2e (diff)
parentd75146fb8157dd03c156e5f7ce4834fa1d72b581 (diff)
downloadnetapp-22d96929d5416750e1f5889ee6cc16b382293104.tar.gz
netapp-22d96929d5416750e1f5889ee6cc16b382293104.zip
Merge branch 'fix-ping' into stream-body
Diffstat (limited to 'src/send.rs')
-rw-r--r--src/send.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/send.rs b/src/send.rs
index ea6cf9f..3b01cb5 100644
--- a/src/send.rs
+++ b/src/send.rs
@@ -231,6 +231,7 @@ pub(crate) trait SendLoop: Sync {
self: Arc<Self>,
msg_recv: mpsc::UnboundedReceiver<SendStream>,
mut write: BoxStreamWrite<W>,
+ debug_name: String,
) -> Result<(), Error>
where
W: AsyncWriteExt + Unpin + Send + Sync,
@@ -238,8 +239,9 @@ pub(crate) trait SendLoop: Sync {
let mut sending = SendQueue::new();
let mut msg_recv = Some(msg_recv);
while msg_recv.is_some() || !sending.is_empty() {
- debug!(
- "Sending: {:?}",
+ trace!(
+ "send_loop({}): queue = {:?}",
+ debug_name,
sending
.items
.iter()
@@ -262,7 +264,7 @@ pub(crate) trait SendLoop: Sync {
biased; // always read incomming channel first if it has data
sth = recv_fut => {
if let Some((id, prio, order_tag, data)) = sth {
- trace!("send_loop: add stream {} to send", id);
+ trace!("send_loop({}): add stream {} to send", debug_name, id);
sending.push(SendQueueItem {
id,
prio,
@@ -275,7 +277,8 @@ pub(crate) trait SendLoop: Sync {
}
(id, data) = send_fut => {
trace!(
- "send_loop: id {}, send {} bytes, header_size {}",
+ "send_loop({}): id {}, send {} bytes, header_size {}",
+ debug_name,
id,
data.data().len(),
hex::encode(data.header())