| Index: runtime/bin/socket_linux.cc
|
| diff --git a/runtime/bin/socket_linux.cc b/runtime/bin/socket_linux.cc
|
| index 44f2fa819e6c789c0ff8fa0d45c610a8a77477a0..e2fdf5c45213f73056739ff9ff34f4da93494344 100644
|
| --- a/runtime/bin/socket_linux.cc
|
| +++ b/runtime/bin/socket_linux.cc
|
| @@ -324,8 +324,8 @@ intptr_t ServerSocket::CreateBindListen(RawAddr addr,
|
|
|
| // Test for invalid socket port 65535 (some browsers disallow it).
|
| if (port == 0 && Socket::GetPort(fd) == 65535) {
|
| - // Don't close fd until we have created new. By doing that we ensure another
|
| - // port.
|
| + // Don't close the socket until we have created a new socket, ensuring
|
| + // that we do not get the bad port number again.
|
| intptr_t new_fd = CreateBindListen(addr, 0, backlog, v6_only);
|
| int err = errno;
|
| VOID_TEMP_FAILURE_RETRY(close(fd));
|
|
|