Skip to content

Commit

Permalink
fix: use traditional thenable
Browse files Browse the repository at this point in the history
  • Loading branch information
bpolaszek committed Nov 1, 2023
1 parent f4cfa5c commit ca716bf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Hub/Transport/Redis/RedisTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public function __construct(
*/
private function ping(): void
{
try {
await($this->redis->ping()); // @phpstan-ignore-line
} catch (Throwable) {
Hub::die(new RuntimeException('Redis connection closed unexpectedly.'));
}
/** @var PromiseInterface $ping */
$ping = $this->redis->ping(); // @phpstan-ignore-line
$ping->then(
onRejected: Hub::die(...),
);
}

public function subscribe(callable $callback): void
Expand Down

0 comments on commit ca716bf

Please sign in to comment.