mirror of
https://github.com/YGGverse/HLState.git
synced 2026-03-31 17:15:39 +00:00
convert socket address to url as php#72811
This commit is contained in:
parent
4d543645a7
commit
19cecef865
1 changed files with 6 additions and 2 deletions
|
|
@ -48,13 +48,17 @@ class CrontabController extends AbstractController
|
||||||
// Get new servers from masters
|
// Get new servers from masters
|
||||||
foreach ((array) explode(',', $this->getParameter('app.masters')) as $master)
|
foreach ((array) explode(',', $this->getParameter('app.masters')) as $master)
|
||||||
{
|
{
|
||||||
if (!$host = parse_url($master, PHP_URL_HOST)) // @TODO IPv6 https://bugs.php.net/bug.php?id=72811
|
$master_url = "udp://" . ltrim($master, "udp://"); // @TODO IPv6 https://bugs.php.net/bug.php?id=72811
|
||||||
|
|
||||||
|
if (!$host = parse_url($master_url, PHP_URL_HOST))
|
||||||
{
|
{
|
||||||
|
print("Could not parse host from " . $master); // @TODO handle
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$port = parse_url($master, PHP_URL_PORT))
|
if (!$port = parse_url($master_url, PHP_URL_PORT))
|
||||||
{
|
{
|
||||||
|
print("Could not parse port from " . $master); // @TODO handle
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue