forked from OSchip/llvm-project
Bind listener to 127.0.0.1 to make sure that loopback address is used.
llvm-svn: 248722
This commit is contained in:
parent
b4d009042b
commit
36c42b592d
|
@ -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 ();
|
||||||
|
|
Loading…
Reference in New Issue