This commit is contained in:
2021-04-30 15:19:34 +08:00
parent ccbcd125a0
commit 92733eab38
3 changed files with 14 additions and 24 deletions
+2 -1
View File
@@ -45,7 +45,8 @@ class Client extends Component
if (!$this->client->isConnected() && !$this->connect()) {
return false;
}
$isSend = $this->client->send(Json::encode(['cmd' => $cmd, 'body' => $param]));
$isSend = $this->client->send(implode("\n", [$cmd, '', serialize($param)]));
if ($isSend === false) {
return $this->addError($this->client->errMsg . '(' . $this->client->errCode . ')');
}