Fix QuicToyClient::SendRequestsAndPrintResponses() in release mode.
QUICHE_DCHECK() does not evaluate its argument in release mode.
PiperOrigin-RevId: 617557773
diff --git a/quiche/quic/tools/quic_toy_client.cc b/quiche/quic/tools/quic_toy_client.cc
index 49afc35..2fae8e5 100644
--- a/quiche/quic/tools/quic_toy_client.cc
+++ b/quiche/quic/tools/quic_toy_client.cc
@@ -431,9 +431,9 @@
if (!quiche::GetQuicheCommandLineFlag(FLAGS_body_hex).empty()) {
QUICHE_DCHECK(quiche::GetQuicheCommandLineFlag(FLAGS_body).empty())
<< "Only set one of --body and --body_hex.";
- QUICHE_DCHECK(absl::HexStringToBytes(
- quiche::GetQuicheCommandLineFlag(FLAGS_body_hex), &body))
- << "Failed to parse --body_hex.";
+ const bool success = absl::HexStringToBytes(
+ quiche::GetQuicheCommandLineFlag(FLAGS_body_hex), &body);
+ QUICHE_DCHECK(success) << "Failed to parse --body_hex.";
}
// Construct a GET or POST request for supplied URL.