Skip to content

Commit 1e6e5c3

Browse files
committed
quic: resolve minor TODO in QuicSocket
PR-URL: #34655 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 8b818cf commit 1e6e5c3

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/quic/node_quic_socket.cc

+2-9
Original file line numberDiff line numberDiff line change
@@ -472,14 +472,7 @@ void QuicSocket::OnReceive(
472472
QuicCID dcid(pdcid, pdcidlen);
473473
QuicCID scid(pscid, pscidlen);
474474

475-
// TODO(@jasnell): It would be fantastic if Debug() could be
476-
// modified to accept objects with a ToString-like capability
477-
// similar to what we can do with TraceEvents... that would
478-
// allow us to pass the QuicCID directly to Debug and have it
479-
// converted to hex only if the category is enabled so we can
480-
// skip committing resources here.
481-
std::string dcid_hex = dcid.ToString();
482-
Debug(this, "Received a QUIC packet for dcid %s", dcid_hex.c_str());
475+
Debug(this, "Received a QUIC packet for dcid %s", dcid);
483476

484477
BaseObjectPtr<QuicSession> session = FindSession(dcid);
485478

@@ -489,7 +482,7 @@ void QuicSocket::OnReceive(
489482
// 3. The packet is a stateless reset sent by the peer
490483
// 4. This is a malicious or malformed packet.
491484
if (!session) {
492-
Debug(this, "There is no existing session for dcid %s", dcid_hex.c_str());
485+
Debug(this, "There is no existing session for dcid %s", dcid);
493486
bool is_short_header = IsShortHeader(pversion, pscid, pscidlen);
494487

495488
// Handle possible reception of a stateless reset token...

0 commit comments

Comments
 (0)