Skip to content

Commit 588c0ed

Browse files
committed
Force event stream
1 parent de6d75c commit 588c0ed

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/services/SseService.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,9 @@ public function throwException(Throwable $exception): void
291291
throw $exception;
292292
}
293293

294-
$this->setSseMethodInProcess(null);
295-
$this->executeScript('console.error(' . json_encode($exception->getMessage()) . ');');
296-
flush();
297-
exit();
294+
$this->getEventStream(function() use ($exception) {
295+
$this->executeScript('console.error(' . json_encode($exception->getMessage()) . ');');
296+
})->send();
298297
}
299298

300299
/**

0 commit comments

Comments
 (0)