Skip to content

Commit

Permalink
Update SwooleAsyncComponent.php
Browse files Browse the repository at this point in the history
修改推送数据未解析的bug
  • Loading branch information
xiaochengfu authored Nov 1, 2017
1 parent ae70992 commit d05bfa7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions component/SwooleAsyncComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ public function mongodbTask($data){
*/
public function pushMsg($fd,$data){
$settings = Yii::$app->params['swooleAsync'];
$data['type'] = self::TYPE_SOCKET;
$datas['data'] = $data;
$datas['type'] = self::TYPE_SOCKET;
$datas['data'] = json_encode($data);
$datas['fd'] = $fd;
$curl = new Curl();
return $curl->setPostParams($data)->post($settings['swoole_http']);
return $curl->setPostParams($datas)->post($settings['swoole_http']);
}

}
}

0 comments on commit d05bfa7

Please sign in to comment.