Index: net/tools/quic/quic_client_base.cc |
diff --git a/net/tools/quic/quic_client_base.cc b/net/tools/quic/quic_client_base.cc |
index 2b2715bb38ef7e36df321f8752a2c3289f3d8790..1b7ed1ed4ab747cac2af21c96f3644645ab47257 100644 |
--- a/net/tools/quic/quic_client_base.cc |
+++ b/net/tools/quic/quic_client_base.cc |
@@ -307,12 +307,16 @@ void QuicClientBase::WaitForStreamToClose(QuicStreamId id) { |
} |
} |
-void QuicClientBase::WaitForCryptoHandshakeConfirmed() { |
+bool QuicClientBase::WaitForCryptoHandshakeConfirmed() { |
DCHECK(connected()); |
while (connected() && !session_->IsCryptoHandshakeConfirmed()) { |
WaitForEvents(); |
} |
+ |
+ // If the handshake fails due to a timeout, the connection will be closed. |
+ LOG_IF(ERROR, !connected()) << "Handshake with server failed."; |
+ return connected(); |
} |
bool QuicClientBase::connected() const { |