From c77eec57c1bf6a304af7e82ed038f36230945f14 Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Mon, 23 Mar 2026 10:15:45 +0100 Subject: [PATCH] I sentry reporting --- src/Websocket/Handler.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Websocket/Handler.php b/src/Websocket/Handler.php index d8f3ca6..aeba7eb 100644 --- a/src/Websocket/Handler.php +++ b/src/Websocket/Handler.php @@ -621,6 +621,13 @@ class Handler implements MessageComponentInterface } } + // Flush Sentry before the child exits so captured events are actually sent. + // Without this, events from report()/captureException() may be lost because + // the child calls exit(0) before the async transport can dispatch them. + if (app()->bound('sentry')) { + app('sentry')->flush(); + } + $ipc->closeChild(); exit(0); }