aboutsummaryrefslogtreecommitdiff
path: root/src/send.rs
diff options
context:
space:
mode:
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())