diff --git a/RpcJsonp.php b/RpcJsonp.php index a10b0ee..0b1e949 100644 --- a/RpcJsonp.php +++ b/RpcJsonp.php @@ -42,7 +42,7 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa { - private int $timerId; + private int $timerId = -1; /** @@ -134,7 +134,9 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa */ public function onWorkerExit(OnWorkerExit $exit): void { - Timer::clear($this->timerId); + if ($this->timerId) { + Timer::clear($this->timerId); + } }