From 77bd162872ed089a2795d265e1f9a961672ad901 Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Thu, 13 Jun 2024 14:30:34 -0400 Subject: [PATCH] fix(server): headers already send (#10289) --- server/src/utils/file.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/utils/file.ts b/server/src/utils/file.ts index c70352af84..578aa66246 100644 --- a/server/src/utils/file.ts +++ b/server/src/utils/file.ts @@ -68,7 +68,7 @@ export const sendFile = async ( return await _sendFile(file.path, options); } catch (error: Error | any) { // ignore client-closed connection - if (isConnectionAborted(error)) { + if (isConnectionAborted(error) || res.headersSent) { return; }