Skip to content

Commit

Permalink
When piping to a response, and an error occurs, end the response
Browse files Browse the repository at this point in the history
  • Loading branch information
naholyr committed Oct 30, 2011
1 parent 84ffd3a commit a44288d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ function File (options) {
) {
if (err.code === 'ENOENT') {
self.dest.statusCode = 404
self.end('Not Found')
self.dest.end('Not Found')
} else {
self.dest.statusCode = 500
self.end(err.message)
self.dest.end(err.message)
}
return
}
Expand Down

0 comments on commit a44288d

Please sign in to comment.