| Index: net/tools/quic/end_to_end_test.cc
|
| diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
|
| index ecf93c65355dcc04ca21627c86430a04143e46b3..e9e5f2a0ec22155ff330f8c6abcc905ed7721d54 100644
|
| --- a/net/tools/quic/end_to_end_test.cc
|
| +++ b/net/tools/quic/end_to_end_test.cc
|
| @@ -1474,15 +1474,15 @@ TEST_P(EndToEndTest, ConnectionMigrationClientPortChanged) {
|
|
|
| // Store the client address which was used to send the first request.
|
| IPEndPoint old_address = client_->client()->GetLatestClientAddress();
|
| -
|
| - // Stop listening and close the old FD.
|
| - QuicClientPeer::CleanUpUDPSocket(client_->client(),
|
| - client_->client()->GetLatestFD());
|
| + int old_fd = client_->client()->GetLatestFD();
|
|
|
| // Create a new socket before closing the old one, which will result in a new
|
| // ephemeral port.
|
| QuicClientPeer::CreateUDPSocketAndBind(client_->client());
|
|
|
| + // Stop listening and close the old FD.
|
| + QuicClientPeer::CleanUpUDPSocket(client_->client(), old_fd);
|
| +
|
| // The packet writer needs to be updated to use the new FD.
|
| client_->client()->CreateQuicPacketWriter();
|
|
|
|
|