這里詳細描述問題
$options = [
'max_conn_per_addr' => 1000, // 每個域名最多維持多少并發(fā)連接
'keepalive_timeout' => 30, // 連接多長時間不通訊就關(guān)閉
'connect_timeout' => 30, // 連接超時時間
'timeout' => 30, // 請求發(fā)出后等待響應的超時時間
];
$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后
啟動報錯
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