Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Unified Diff: net/tools/quic/end_to_end_test.cc

Issue 297213009: Open a new port before closing the original in QUIC's port migration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6ae2622d0a0e0da4f7f662e76b89054e3d5a2b52..0f2e9c527ac577e4e1af45d6dd0213df32dd5a47 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -1000,10 +1000,10 @@ TEST_P(EndToEndTest, ConnectionMigrationClientPortChanged) {
EpollServer* eps = client_->client()->epoll_server();
int old_fd = client_->client()->fd();
eps->UnregisterFD(old_fd);
- close(old_fd);
-
- // Create a new socket, which will result in a new ephemeral port.
+ // Create a new socket before closing the old one, which will result in a new
+ // ephemeral port.
QuicClientPeer::CreateUDPSocket(client_->client());
+ close(old_fd);
// The packet writer needs to be updated to use the new FD.
client_->client()->CreateQuicPacketWriter();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698