Browse files

When piping to a response, and an error occurs, end the response

  • Loading branch information...
1 parent 84ffd3a commit a44288df8f0ff893f7139267822657dae961a8f9 @naholyr naholyr committed Oct 30, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 main.js
View
4 main.js
@@ -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
}

0 comments on commit a44288d

Please sign in to comment.