Skip to content

Commit

Permalink
fix(server): headers already send (#10289)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasm91 authored Jun 13, 2024
1 parent c6ab047 commit 77bd162
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/utils/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 77bd162

Please sign in to comment.