From 88c3958abac14a015f527220a6dbaed4f80ef6f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Thu, 13 Jan 2022 18:42:42 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=94=B9=E5=90=8D"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit fdf58326 --- RpcJsonp.php | 1 - RpcManager.php | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/RpcJsonp.php b/RpcJsonp.php index 2596fa3..3ab635d 100644 --- a/RpcJsonp.php +++ b/RpcJsonp.php @@ -94,7 +94,6 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa return; } $async_time = (int)Config::get('consul.async_time', 1000); - var_dump($async_time); Timer::tick($async_time, static function ($timeId) { if (env('state', 'start') == 'exit') { Timer::clear($timeId); diff --git a/RpcManager.php b/RpcManager.php index b1b6bfa..28df8bc 100644 --- a/RpcManager.php +++ b/RpcManager.php @@ -68,13 +68,16 @@ class RpcManager extends Component /** - * @throws ReflectionException * @throws Exception */ public function tick(): void { - foreach ($this->_rpc as $name => $list) { - $this->async($name); + try { + foreach ($this->_rpc as $name => $list) { + $this->async($name); + } + } catch (\Throwable $throwable) { + $this->logger()->error(error_trigger_format($throwable)); } }