Bind listener to 127.0.0.1 to make sure that loopback address is used.

llvm-svn: 248722
This commit is contained in:
Oleksiy Vyalov 2015-09-28 17:42:16 +00:00
parent b4d009042b
commit 36c42b592d
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ static Error
FindUnusedPort (uint16_t& port) FindUnusedPort (uint16_t& port)
{ {
Socket* socket = nullptr; Socket* socket = nullptr;
auto error = Socket::TcpListen ("localhost:0", false, socket, nullptr); auto error = Socket::TcpListen ("127.0.0.1:0", false, socket, nullptr);
if (error.Success ()) if (error.Success ())
{ {
port = socket->GetLocalPortNumber (); port = socket->GetLocalPortNumber ();