fix IPv6 address handling in server commands

This commit is contained in:
Christian Flothmann 2016-12-30 11:19:53 +01:00
parent 7e8e9e3a6e
commit 2bb47136df
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ abstract class ServerCommand extends ContainerAwareCommand
return true;
}
list($hostname, $port) = explode(':', $address);
$pos = strrpos($address, ':');
$hostname = substr($address, 0, $pos);
$port = substr($address, $pos + 1);
$fp = @fsockopen($hostname, $port, $errno, $errstr, 5);