Chromium Code Reviews| Index: net/quic/quic_client_session.cc |
| diff --git a/net/quic/quic_client_session.cc b/net/quic/quic_client_session.cc |
| index 0625f08077d30c5c7c62a77e5668a72b8ee1c2d6..5c97667dc40ae84a697ddf3c04529f4e618430b9 100644 |
| --- a/net/quic/quic_client_session.cc |
| +++ b/net/quic/quic_client_session.cc |
| @@ -593,6 +593,21 @@ void QuicClientSession::OnClosedStream() { |
| } |
| void QuicClientSession::OnCryptoHandshakeEvent(CryptoHandshakeEvent event) { |
| + if (stream_factory_ && event == HANDSHAKE_CONFIRMED) { |
| + float packet_loss_rate = logger_->PacketLossRate() / 10; |
|
Ryan Hamilton
2015/03/23 02:31:06
Why / 10?
ramant (doing other things)
2015/03/24 03:07:22
Remove the percent. Used fraction.
|
| + if (packet_loss_rate > stream_factory_->packet_loss_threshold()) { |
| + stream_factory_->OnBadPacketLoss(server_id_); |
|
Ryan Hamilton
2015/03/23 02:31:06
I wonder if it might make more sense for this to b
ramant (doing other things)
2015/03/24 03:07:22
Done.
|
| + // We abandon the connection if packet loss rate is too bad. |
| + DVLOG(1) << "Closing session on bad packet loss rate: " |
| + << packet_loss_rate; |
| + UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.HasBadPacketLossRate", true); |
| + NotifyFactoryOfSessionGoingAway(); |
| + CloseSessionOnErrorInner(ERR_ABORTED, QUIC_BAD_PACKET_LOSS_RATE); |
| + NotifyFactoryOfSessionClosedLater(); |
|
Ryan Hamilton
2015/03/23 02:31:06
Is there a method the factory could call which wou
ramant (doing other things)
2015/03/24 03:07:22
Called CloseSessionOnError from QuicStreamFactory.
|
| + return; |
| + } |
| + } |
| + |
| if (!callback_.is_null() && |
| (!require_confirmation_ || |
| event == HANDSHAKE_CONFIRMED || event == ENCRYPTION_REESTABLISHED)) { |