mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 03:56:16 +08:00
Bind listener to 127.0.0.1 to make sure that loopback address is used.
llvm-svn: 248722
This commit is contained in:
@@ -53,7 +53,7 @@ static Error
|
||||
FindUnusedPort (uint16_t& port)
|
||||
{
|
||||
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 ())
|
||||
{
|
||||
port = socket->GetLocalPortNumber ();
|
||||
|
||||
Reference in New Issue
Block a user