1
0
mirror of https://github.com/danog/ipc.git synced 2024-11-26 12:04:51 +01:00
This commit is contained in:
Daniil Gentili 2021-05-03 15:39:45 +02:00
parent faa13a43aa
commit 470ab94b92
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 3 additions and 3 deletions

View File

@ -51,14 +51,14 @@ class IpcServer
}
} elseif ($type === self::TYPE_AUTO) {
$types = [];
if (strlen($uri) <= 104) {
if (\strlen($uri) <= 104) {
$types []= self::TYPE_UNIX;
}
$types []= self::TYPE_FIFO;
$types []= self::TYPE_TCP;
} else {
$types = [];
if ($type & self::TYPE_UNIX && strlen($uri) <= 104) {
if ($type & self::TYPE_UNIX && \strlen($uri) <= 104) {
$types []= self::TYPE_UNIX;
}
if ($type & self::TYPE_TCP) {

View File

@ -60,7 +60,7 @@ class IpcTest extends AsyncTestCase
public function provideUriType(): \Generator
{
foreach (['', \sys_get_temp_dir().'/pony', \sys_get_temp_dir().'/'.str_repeat('a', 200)] as $uri) {
foreach (['', \sys_get_temp_dir().'/pony', \sys_get_temp_dir().'/'.\str_repeat('a', 200)] as $uri) {
if (\strncasecmp(\PHP_OS, "WIN", 3) === 0) {
yield [$uri, IpcServer::TYPE_AUTO];
yield [$uri, IpcServer::TYPE_TCP];