diff --git a/src/Client.php b/src/Client.php index f995a92..67f6a47 100644 --- a/src/Client.php +++ b/src/Client.php @@ -114,8 +114,7 @@ public function connect(): void { co::run(function () { go(fn () => $this->startConnection()); - go(fn () => Timer::tick(5000, function (int $timerId) { - $this->pingTimer = $timerId; + go(fn () => $this->pingTimer = Timer::tick(5000, function () { if ($this->getClient() && $this->getClient()->isConnected()) { $this->getClient()->ping(); }