Skip to content

Commit

Permalink
fix "Undefined variable $app"
Browse files Browse the repository at this point in the history
  • Loading branch information
kingIZZZY authored Dec 23, 2024
1 parent 6481ec1 commit d1c95df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OctaneServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public function register()
));
});

$serverClass = $app['config']->get('octane.swoole.enableWebSockets') ? 'Swoole\WebSocket\Server' : 'Swoole\Http\Server';
$this->app->bind(DispatchesCoroutines::class, function ($app) {
$serverClass = $app['config']->get('octane.swoole.enableWebSockets') ? 'Swoole\WebSocket\Server' : 'Swoole\Http\Server';
return class_exists($serverClass)
? new SwooleCoroutineDispatcher($app->bound($serverClass))
: $app->make(SequentialCoroutineDispatcher::class);
Expand Down

0 comments on commit d1c95df

Please sign in to comment.