From 5d1a7d067070842228f1462376c5e69d55fdb925 Mon Sep 17 00:00:00 2001 From: Albert Chen Date: Tue, 5 Mar 2019 21:39:17 +0800 Subject: [PATCH] revert task_enable_coroutine support --- src/Server/Manager.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Server/Manager.php b/src/Server/Manager.php index b93e66c9..4258a707 100644 --- a/src/Server/Manager.php +++ b/src/Server/Manager.php @@ -5,6 +5,7 @@ use Exception; use Throwable; use Swoole\Process; +use Swoole\Server\Task; use Illuminate\Support\Str; use SwooleTW\Http\Helpers\OS; use SwooleTW\Http\Server\Sandbox; @@ -256,13 +257,13 @@ protected function resetOnRequest() * Set onTask listener. * * @param mixed $server - * @param string|\Swoole\Server\Task $taskIdOrTask - * @param string $srcWorkerId Optional - * @param mixed $data Optional + * @param string|\Swoole\Server\Task $taskId or $task + * @param string $srcWorkerId + * @param mixed $data */ - public function onTask($server, ...$args) + public function onTask($server, $taskId, $srcWorkerId, $data) { - $this->container->make('events')->dispatch('swoole.task', [$server, $args]); + $this->container->make('events')->dispatch('swoole.task', func_get_args()); try { // push websocket message