diff --git a/composer.json b/composer.json index 712b0aa..91858d9 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "phptars/tars-client", "description": "tars的php-client能力", - "version":"0.3.0", + "version":"0.3.1", "authors": [ { "name": "Chen Liang", diff --git a/src/Communicator.php b/src/Communicator.php old mode 100644 new mode 100755 index 23fe34a..43d4094 --- a/src/Communicator.php +++ b/src/Communicator.php @@ -66,7 +66,7 @@ public function __construct(CommunicatorConfig $config) $this->_queryF = new QueryFWrapper($this->_locator, $this->_routeSocketMode, $this->_refreshEndpointInterval); $this->_routeInfo = $this->_queryF->findObjectById($this->_servantName); // 初始化上报组件,只在指定了主控的前提下 - if(class_exists("\Tars\App")) { + if(class_exists("\Tars\App") && \Tars\App::getStatF()) { $this->_statF = \Tars\App::getStatF(); } else {