Skip to content

Commit

Permalink
remove return value from method \Swoole\Server\Admin::start()
Browse files Browse the repository at this point in the history
  • Loading branch information
deminy committed Dec 9, 2023
1 parent 4e2b2b7 commit f211ae1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/core/Server/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,12 @@ public static function getAccessToken(): string
return self::$accessToken;
}

public static function start(Server $server)
public static function start(Server $server): void
{
$admin_server_uri = swoole_string($server->setting['admin_server']);
if ($admin_server_uri->startsWith('unix:/')) {
return swoole_error_log(SWOOLE_LOG_ERROR, "admin_server[{$server->setting['admin_server']}] is not supported");
swoole_error_log(SWOOLE_LOG_ERROR, "admin_server[{$server->setting['admin_server']}] is not supported");
return;
}

if ($admin_server_uri->contains('@')) {
Expand Down Expand Up @@ -424,7 +425,8 @@ public static function start(Server $server)
$method = $req->getMethod();

if ($method === 'OPTIONS') {
return $resp->end();
$resp->end();
return;
}

$token = self::getAccessToken();
Expand Down

0 comments on commit f211ae1

Please sign in to comment.