Skip to content

Commit e7cd105

Browse files
committed
update: 改进参数解析处理
1 parent 2ed7f8c commit e7cd105

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Server.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,12 @@ protected function resolveConfig(): void
101101
}
102102
}
103103

104-
protected static function parseStrToListenAddr(string $str, int $defaultPort): array
104+
protected static function parseStrToListenAddr(string $str, int $defaultPort): ?array
105105
{
106106
$listen = parse_str_ip_and_port($str, $defaultPort);
107+
if ($listen === null) {
108+
return null;
109+
}
107110
if ($listen[2] ?? false) {
108111
$sockType = SWOOLE_UNIX_STREAM;
109112
} else {

0 commit comments

Comments
 (0)