events-backend: fix blocking request being ended too early

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-05-27 11:51:59 +02:00
parent 66487229cc
commit a97b71ab07
@@ -241,9 +241,7 @@ export async function createEventBusRouter(options: {
{ subject: credentials.principal.subject },
);
} catch (error) {
if (error === controller.signal.reason) {
res.end();
} else {
if (error !== controller.signal.reason) {
throw error;
}
} finally {