This commit is contained in:
李铭昕 2023-02-22 10:10:58 +08:00 committed by GitHub
parent e78f538b47
commit 0ac1d5e807
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -117,6 +117,8 @@ class Client implements ClientInterface
private function getSecurityCredentialsWithEcsRamRole(string $ecsRamRole): ?array
{
$securityCredentials = $this->cachedSecurityCredentials[$ecsRamRole] ?? null;
/* @phpstan-ignore-next-line */
if (! empty($securityCredentials) && time() > strtotime($securityCredentials['Expiration']) - 60) {
$securityCredentials = null;
}

View File

@ -84,10 +84,8 @@ class RoutesCommand extends HyperfCommand
$action = $handler->callback[0] . '::' . $handler->callback[1];
} elseif (is_string($handler->callback)) {
$action = $handler->callback;
} elseif (is_callable($handler->callback)) {
$action = 'Closure';
} else {
$action = (string) $handler->callback;
$action = 'Closure';
}
$unique = "{$serverName}|{$uri}|{$action}";
if (isset($data[$unique])) {