This commit is contained in:
2021-03-29 18:43:08 +08:00
parent 1dbfb7fd27
commit 9f31902379
+3 -1
View File
@@ -49,10 +49,12 @@ class Client extends Component
return false;
}
$isSend = $this->client->send(Json::encode(['cmd' => $cmd, 'body' => $param]));
$this->recover();
if ($isSend === false) {
return $this->addError($this->client->errMsg . '(' . $this->client->errCode . ')');
}
\Swoole\Coroutine\defer(function () {
$this->recover();
});
if (is_bool($unpack = Json::decode($this->client->recv()))) {
return $this->addError('Service return data format error(500)');
}