fixed
This commit is contained in:
@@ -183,6 +183,12 @@ class Events extends \think\worker\Events
|
||||
//$res = Tools::set_ok('ok',['client_id'=>$client_id,'msg'=>'你发来的消息我接收到了:',$client_id=>$data]);
|
||||
//Gateway::sendToClient($client_id,json_encode($res,JSON_UNESCAPED_UNICODE));
|
||||
|
||||
if(empty($data)){
|
||||
$json = BaseWssApi::json_wss('onMessage','消息为空',['client_id'=>$client_id,'data'=>$data]);
|
||||
|
||||
Gateway::sendToClient($client_id, $json);
|
||||
return ;
|
||||
}
|
||||
//解析消息
|
||||
|
||||
//解析action
|
||||
@@ -219,7 +225,7 @@ class Events extends \think\worker\Events
|
||||
$result = $client->getResult($taskId)->getBody()->getContents();
|
||||
Tools::log_to_write_txt(['获取结果,json格式:'=>$result]);
|
||||
// 清理临时文件
|
||||
unlink($result);
|
||||
unlink($tempFile);
|
||||
|
||||
Gateway::sendToClient($client_id, $result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user