modify
This commit is contained in:
@@ -137,7 +137,6 @@ class OnTask extends Callback
|
||||
if (empty($serialize = swoole_unserialize($data))) {
|
||||
return null;
|
||||
}
|
||||
$serialize = array_shift($serialize);
|
||||
if (!($serialize instanceof ITask)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ class Async extends Component
|
||||
|
||||
$randWorkerId = random_int(0, $server->setting['task_worker_num'] - 1);
|
||||
|
||||
$server->task(swoole_serialize([$class, 'onHandler']), $randWorkerId);
|
||||
$server->task(serialize($class), $randWorkerId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user