mirror of
https://github.com/danog/parallel.git
synced 2025-01-22 14:01:14 +01:00
Use 127.0.0.1 instead of localhost
Avoids DNS lookup issues on Windows.
This commit is contained in:
parent
8d60fdbb64
commit
cb2aa9c59c
@ -35,7 +35,7 @@ class ProcessHub
|
||||
$isWindows = \strncasecmp(\PHP_OS, "WIN", 3) === 0;
|
||||
|
||||
if ($isWindows) {
|
||||
$this->uri = "tcp://localhost:0";
|
||||
$this->uri = "tcp://127.0.0.1:0";
|
||||
} else {
|
||||
$this->uri = "unix://" . \tempnam(\sys_get_temp_dir(), "amp-parallel-ipc-") . ".sock";
|
||||
}
|
||||
@ -49,7 +49,7 @@ class ProcessHub
|
||||
if ($isWindows) {
|
||||
$name = \stream_socket_get_name($this->server, false);
|
||||
$port = \substr($name, \strrpos($name, ":") + 1);
|
||||
$this->uri = "tcp://localhost:" . $port;
|
||||
$this->uri = "tcp://127.0.0.1:" . $port;
|
||||
}
|
||||
|
||||
$keys = &$this->keys;
|
||||
|
Loading…
x
Reference in New Issue
Block a user