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:
parent
c4e5cb71b4
commit
703adeaffc
1 changed files with 3 additions and 2 deletions
|
@ -71,10 +71,11 @@ module.exports = function(config_hash) {
|
|||
if (!res.status || !res.send) {
|
||||
Logger.logger.error('this is an error in express.js, please report this')
|
||||
res.destroy()
|
||||
}
|
||||
if (calls == 1) {
|
||||
} else if (calls == 1) {
|
||||
res.status(500)
|
||||
res.send({error: 'internal server error'})
|
||||
} else {
|
||||
// socket should be already closed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue