改名
This commit is contained in:
+4
-2
@@ -6,7 +6,7 @@ namespace Rpc;
|
|||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
use Snowflake\Abstracts\Component;
|
use Snowflake\Abstracts\Component;
|
||||||
use Snowflake\Abstracts\Config;
|
use Swoole;
|
||||||
use Snowflake\Core\Json;
|
use Snowflake\Core\Json;
|
||||||
use Snowflake\Exception\ConfigException;
|
use Snowflake\Exception\ConfigException;
|
||||||
use Swoole\Coroutine\Client as CClient;
|
use Swoole\Coroutine\Client as CClient;
|
||||||
@@ -52,7 +52,9 @@ class Client extends Component
|
|||||||
if ($isSend === false) {
|
if ($isSend === false) {
|
||||||
return $this->addError($this->client->errMsg . '(' . $this->client->errCode . ')');
|
return $this->addError($this->client->errMsg . '(' . $this->client->errCode . ')');
|
||||||
}
|
}
|
||||||
|
Swoole\Coroutine\defer(function () {
|
||||||
|
$this->client->close();
|
||||||
|
});
|
||||||
if (is_bool($unpack = Json::decode($this->client->recv()))) {
|
if (is_bool($unpack = Json::decode($this->client->recv()))) {
|
||||||
return $this->addError('Service return data format error(500)');
|
return $this->addError('Service return data format error(500)');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user