Skip to content

Commit

Permalink
修改代码错误
Browse files Browse the repository at this point in the history
  • Loading branch information
titrxw committed Nov 28, 2020
1 parent d900fb4 commit baeebfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Core/Task/TaskDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function dispatchAsync(TaskMessage $message) {
* @throws \Throwable
*/
protected function dispatchNow($message, $server = null, $taskId = null, $workerId = null) {
$server = $server ?? App::$server->getServer();
$server = $server ?? (App::$server ? App::$server->getServer() : null);
$taskId = $taskId ?? $this->getContext()->getCoroutineId();
$workId = $workerId ?? ($server ? $server->worker_id : $workerId);

Expand Down

0 comments on commit baeebfb

Please sign in to comment.