| Index: net/quic/quic_connection.cc
|
| diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
|
| index 273f4f54d8ecaff1908792d558c21a5dcdcf46de..722d399d0103bd99c75ae5642cca9912a187380d 100644
|
| --- a/net/quic/quic_connection.cc
|
| +++ b/net/quic/quic_connection.cc
|
| @@ -1618,7 +1618,12 @@ void QuicConnection::SendConnectionCloseWithDetails(QuicErrorCode error,
|
| // If we're write blocked, WritePacket() will not send, but will capture the
|
| // serialized packet.
|
| SendConnectionClosePacket(error, details);
|
| - CloseConnection(error, false);
|
| + if (connected_) {
|
| + // It's possible that while sending the connection close packet, we get a
|
| + // socket error and disconnect right then and there. Avoid a double
|
| + // disconnect in that case.
|
| + CloseConnection(error, false);
|
| + }
|
| }
|
|
|
| void QuicConnection::SendConnectionClosePacket(QuicErrorCode error,
|
|
|