Permalink
Browse files

Changed: ignore error handling middleware when header is sent

until we come up with a better solution
either this or every error-handling middleware
needs to check res.headerSent
  • Loading branch information...
1 parent d0e61c9 commit 91edd0bac49a4ace1c9ad373c13617a2aaad2772 @tj tj committed Aug 27, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/http.js
View
@@ -145,7 +145,7 @@ Server.prototype.handle = function(req, res, out) {
layer = stack[index++];
// all done
- if (!layer) {
+ if (!layer || res.headerSent) {
// but wait! we have a parent
if (out) return out(err);

0 comments on commit 91edd0b

Please sign in to comment.