Skip to content

Commit

Permalink
Add error check on socket close handler
Browse files Browse the repository at this point in the history
  • Loading branch information
cvasseng committed Nov 13, 2024
1 parent 57904d3 commit e44a649
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/server/routes/export.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ const exportHandler = async (request, response, next) => {
connectionAborted = true;
});

request.socket.on('clientError', () => {
connectionAborted = true;
});

log(4, `[export] Got an incoming HTTP request with ID ${uniqueId}.`);

body.constr = (typeof body.constr === 'string' && body.constr) || 'chart';
Expand Down

0 comments on commit e44a649

Please sign in to comment.