這里詳細(xì)描述問(wèn)題
$options = [
'max_conn_per_addr' => 1000, // 每個(gè)域名最多維持多少并發(fā)連接
'keepalive_timeout' => 30, // 連接多長(zhǎng)時(shí)間不通訊就關(guān)閉
'connect_timeout' => 30, // 連接超時(shí)時(shí)間
'timeout' => 30, // 請(qǐng)求發(fā)出后等待響應(yīng)的超時(shí)時(shí)間
];
$http = new \Workerman\Http\ParallelClient( $options );
$http->push( $url, [ 'data' =>json_encode( $params ), 'headers' =>[ "Content-type: application/json" ] ] );
$result = $http ->await();
Please install revolt/event-loop to use parallel client. in /www/wwwroot/push/vendor/workerman/http-client/src/ParallelClient.php:31
將false改成true后
啟動(dòng)報(bào)錯(cuò)
Event loop terminated without resuming the current suspension (the cause is either a fiber deadlock, or an incorrectly unreferenced/canceled watcher): in /www/wwwroot/flowertown-push/vendor/revolt/event-loop/src/EventLoop/Internal/DriverSuspension.php:145
php8.3
webman v1.5.21