Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Commit 5d1a7d0

Browse files
committed
revert task_enable_coroutine support
1 parent b341335 commit 5d1a7d0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Server/Manager.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Exception;
66
use Throwable;
77
use Swoole\Process;
8+
use Swoole\Server\Task;
89
use Illuminate\Support\Str;
910
use SwooleTW\Http\Helpers\OS;
1011
use SwooleTW\Http\Server\Sandbox;
@@ -256,13 +257,13 @@ protected function resetOnRequest()
256257
* Set onTask listener.
257258
*
258259
* @param mixed $server
259-
* @param string|\Swoole\Server\Task $taskIdOrTask
260-
* @param string $srcWorkerId Optional
261-
* @param mixed $data Optional
260+
* @param string|\Swoole\Server\Task $taskId or $task
261+
* @param string $srcWorkerId
262+
* @param mixed $data
262263
*/
263-
public function onTask($server, ...$args)
264+
public function onTask($server, $taskId, $srcWorkerId, $data)
264265
{
265-
$this->container->make('events')->dispatch('swoole.task', [$server, $args]);
266+
$this->container->make('events')->dispatch('swoole.task', func_get_args());
266267

267268
try {
268269
// push websocket message

0 commit comments

Comments
 (0)