check that res has not already been sent before sending catch 500

This commit is contained in:
Henry Oswald 2014-03-05 18:13:40 +00:00
parent 2f22563d59
commit e8b245e857

View file

@ -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