From d50d8310c2ba62215867bd01226ad4d0e7d229d7 Mon Sep 17 00:00:00 2001 From: Milos Stankovic <82043364+morph-dev@users.noreply.github.com> Date: Tue, 4 Feb 2025 10:53:38 +0200 Subject: [PATCH] fix: pr comments --- src/conn.rs | 2 +- src/socket.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conn.rs b/src/conn.rs index 40f8e38..d2336e0 100644 --- a/src/conn.rs +++ b/src/conn.rs @@ -237,7 +237,7 @@ impl Connection { mut writes: mpsc::UnboundedReceiver, mut shutdown: oneshot::Receiver<()>, ) -> io::Result<()> { - tracing::debug!("uTP conn starting... {:?}", self.cid.peer_id); + tracing::debug!("uTP conn starting... {:?}", self.peer); // If we are the initiating endpoint, then send the SYN. If we are the accepting endpoint, // then send the SYN-ACK. diff --git a/src/socket.rs b/src/socket.rs index ca5dd1b..4ea0766 100644 --- a/src/socket.rs +++ b/src/socket.rs @@ -96,7 +96,7 @@ where let packet = match Packet::decode(&buf[..n]) { Ok(pkt) => pkt, Err(..) => { - tracing::warn!(?peer_id, "unable to decode uTP packet"); + tracing::warn!(?peer, "unable to decode uTP packet"); continue; } }; @@ -115,7 +115,7 @@ where } None => { if std::matches!(packet.packet_type(), PacketType::Syn) { - let cid = cid_from_packet::

(&packet, peer_id, IdType::RecvId); + let cid = acc_cid; // If there was an awaiting connection with the CID, then // create a new stream for that connection. Otherwise, add the