diff --git a/Rpc/Client.php b/Rpc/Client.php index 9e24c41d..3475e2a0 100644 --- a/Rpc/Client.php +++ b/Rpc/Client.php @@ -57,6 +57,18 @@ class Client extends Component } + /** + * 断开链接 + */ + public function close() + { + if (!$this->client || !$this->client->isConnected()) { + return; + } + $this->client->close(); + } + + /** * @return mixed * @throws Exception