Skip to content

Commit

Permalink
socket could've been closed twice, fix #80
Browse files Browse the repository at this point in the history
  • Loading branch information
rlidwka committed Jun 20, 2014
1 parent c4e5cb7 commit 703adea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down

0 comments on commit 703adea

Please sign in to comment.