fix(server) combine: write error to pipe if headers sent

This commit is contained in:
coderaiser 2013-11-28 11:59:02 +00:00
parent 68c9c46d30
commit 6310b7c135

View file

@ -243,8 +243,17 @@
dir : dir,
write : stream,
callback : function(error) {
if (error)
main.sendError(params, error);
var errorStr;
if (error) {
if (!p.response.headersSent)
main.sendError(params, error);
else {
Util.log(error);
errorStr = error.toString();
stream.end(errorStr);
}
}
}
});