fix IPv6 address handling in server commands
This commit is contained in:
parent
7e8e9e3a6e
commit
2bb47136df
|
@ -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);
|
||||
|
||||
|
|
Reference in New Issue