modify plugin name

This commit is contained in:
2022-06-17 13:44:24 +08:00
parent 8d20f56660
commit 45315dcbb2
+4 -1
View File
@@ -10,6 +10,7 @@ use Kiri\Abstracts\Config;
use Kiri\Annotation\Annotation; use Kiri\Annotation\Annotation;
use Kiri\Consul\Agent; use Kiri\Consul\Agent;
use Kiri\Context; use Kiri\Context;
use Kiri\Core\Json;
use Kiri\Events\EventProvider; use Kiri\Events\EventProvider;
use Kiri\Exception\ConfigException; use Kiri\Exception\ConfigException;
use Kiri\Message\Constrict\RequestInterface; use Kiri\Message\Constrict\RequestInterface;
@@ -147,7 +148,9 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa
$server->send($fd, $this->batchDispatch($data)); $server->send($fd, $this->batchDispatch($data));
} catch (\Throwable $throwable) { } catch (\Throwable $throwable) {
$this->logger->error('JsonRpc: ' . $throwable->getMessage()); $this->logger->error('JsonRpc: ' . $throwable->getMessage());
$server->send($fd, $this->failure(-32700, 'Parse error语法解析错误')); $response = Json::encode($this->failure(-32700, $throwable->getMessage()));
$server->send($fd, $response);
$server->close($fd);
} }
} }