Skip to content

Commit

Permalink
Update: bind request instance
Browse files Browse the repository at this point in the history
  • Loading branch information
cclilshy committed Nov 29, 2024
1 parent dad37a4 commit 1e73ad0
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/Laravel/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,9 @@ public function register(Manager $manager): void
public function boot(): void
{
try {
onSignal(SIGINT, function () {
exit(0);
});

onSignal(SIGTERM, function () {
exit(0);
});

onSignal(SIGQUIT, function () {
exit(0);
});
onSignal(SIGINT, static fn () => exit(0));
onSignal(SIGTERM, static fn () => exit(0));
onSignal(SIGQUIT, static fn () => exit(0));
} catch (UnsupportedFeatureException $e) {
Output::warning("signal registration failure may cause the program to fail to exit normally: {$e->getMessage()}");
}
Expand Down Expand Up @@ -200,6 +192,7 @@ public function boot(): void
);

$application = clone $this->application;
$application->instance('request', $laravelRequest);
$this->dispatchEvent($application, new RequestReceived($this->application, $application, $laravelRequest));

try {
Expand Down

0 comments on commit 1e73ad0

Please sign in to comment.