0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-27 22:59:51 -05:00

socket could've been closed twice, fix #80

This commit is contained in:
Alex Kocharin 2014-06-20 08:12:37 +04:00
parent c4e5cb71b4
commit 703adeaffc

View file

@ -71,10 +71,11 @@ module.exports = function(config_hash) {
if (!res.status || !res.send) { if (!res.status || !res.send) {
Logger.logger.error('this is an error in express.js, please report this') Logger.logger.error('this is an error in express.js, please report this')
res.destroy() res.destroy()
} } else if (calls == 1) {
if (calls == 1) {
res.status(500) res.status(500)
res.send({error: 'internal server error'}) res.send({error: 'internal server error'})
} else {
// socket should be already closed
} }
} }
} }