| Index: net/quic/quic_dispatcher.cc
|
| diff --git a/net/quic/quic_dispatcher.cc b/net/quic/quic_dispatcher.cc
|
| index f750bfaef39f64b009818389cea2961695e3a4c0..1ce40c9df047735d29bcfe6b66390fa0f82d3980 100644
|
| --- a/net/quic/quic_dispatcher.cc
|
| +++ b/net/quic/quic_dispatcher.cc
|
| @@ -361,28 +361,17 @@ QuicSession* QuicDispatcher::CreateQuicSession(
|
| QuicConnectionId connection_id,
|
| const IPEndPoint& server_address,
|
| const IPEndPoint& client_address) {
|
| - QuicServerSession* session = new QuicServerSession(
|
| - config_,
|
| - CreateQuicConnection(connection_id, server_address, client_address),
|
| - this);
|
| + // The QuicSession takes ownership of |connection| below.
|
| + QuicConnection* connection = new QuicConnection(
|
| + connection_id, client_address, helper_, connection_writer_factory_,
|
| + /* owns_writer= */ true, /* is_server= */ true,
|
| + crypto_config_.HasProofSource(), supported_versions_);
|
| +
|
| + QuicServerSession* session = new QuicServerSession(config_, connection, this);
|
| session->InitializeSession(crypto_config_);
|
| return session;
|
| }
|
|
|
| -QuicConnection* QuicDispatcher::CreateQuicConnection(
|
| - QuicConnectionId connection_id,
|
| - const IPEndPoint& server_address,
|
| - const IPEndPoint& client_address) {
|
| - return new QuicConnection(connection_id,
|
| - client_address,
|
| - helper_,
|
| - connection_writer_factory_,
|
| - /* owns_writer= */ true,
|
| - /* is_server= */ true,
|
| - crypto_config_.HasProofSource(),
|
| - supported_versions_);
|
| -}
|
| -
|
| QuicTimeWaitListManager* QuicDispatcher::CreateQuicTimeWaitListManager() {
|
| return new QuicTimeWaitListManager(
|
| writer_.get(), this, helper_, supported_versions());
|
|
|