Skip to content

Commit d05bfa7

Browse files
authored
Update SwooleAsyncComponent.php
修改推送数据未解析的bug
1 parent ae70992 commit d05bfa7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

component/SwooleAsyncComponent.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ public function mongodbTask($data){
160160
*/
161161
public function pushMsg($fd,$data){
162162
$settings = Yii::$app->params['swooleAsync'];
163-
$data['type'] = self::TYPE_SOCKET;
164-
$datas['data'] = $data;
163+
$datas['type'] = self::TYPE_SOCKET;
164+
$datas['data'] = json_encode($data);
165165
$datas['fd'] = $fd;
166166
$curl = new Curl();
167-
return $curl->setPostParams($data)->post($settings['swoole_http']);
167+
return $curl->setPostParams($datas)->post($settings['swoole_http']);
168168
}
169169

170-
}
170+
}

0 commit comments

Comments
 (0)