Skip to content

Commit 71157fa

Browse files
cleanup
1 parent 17f256a commit 71157fa

File tree

1 file changed

+4
-10
lines changed
  • quinn-proto/src/connection

1 file changed

+4
-10
lines changed

quinn-proto/src/connection/mod.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,20 +1114,14 @@ impl Connection {
11141114
{
11151115
let destination = probing.remote();
11161116
let token: u64 = self.rng.random();
1117-
trace!(%destination, cid=%new_cid, token=format!("{:08x}", token), "Nat traversal: PATH_CHALLENGE packet");
1118-
// TODO(@divma): abstract writing path challenges, this logic should
1119-
// no be here
1120-
1121-
buf.write(frame::FrameType::PATH_CHALLENGE);
1122-
buf.write(token);
1123-
// TODO(@divma): can I just create a new qlog?
1124-
// qlog.frame(&Frame::PathChallenge(token));
1125-
// TODO(@divma): separate stat?
1117+
let challenge = frame::PathChallenge(token);
1118+
trace!(%destination, cid=%new_cid, %challenge, "Nat traversal: PATH_CHALLENGE packet");
1119+
buf.write(challenge);
1120+
QlogSentPacket::default().frame(&Frame::PathChallenge(challenge));
11261121
self.stats.frame_tx.path_challenge += 1;
11271122

11281123
// Remember the token sent to this remote
11291124
probing.finish(token);
1130-
// TODO(@divma): figure out padding if any
11311125
return Some(Transmit {
11321126
destination,
11331127
ecn: None,

0 commit comments

Comments
 (0)