From e8b245e857d00c087bb2b331766034d03c704ca9 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Wed, 5 Mar 2014 18:13:40 +0000 Subject: [PATCH] check that res has not already been sent before sending catch 500 --- services/filestore/app.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/filestore/app.coffee b/services/filestore/app.coffee index fc6cce6ede..027ec11119 100644 --- a/services/filestore/app.coffee +++ b/services/filestore/app.coffee @@ -35,7 +35,8 @@ app.use (req, res, next) -> requestDomain.add req requestDomain.add res requestDomain.on "error", (err)-> - res.send 500 + if !res.finished + res.send(500) logger = require('logger-sharelatex') req = body:req.body