Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Oct 30, 2011
Jump to file or symbol
Failed to load files and symbols.
+2 −2
Split
View
@@ -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
}