From db5c4cef06967d7af45b926e1a2b74754966377d Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 21 Nov 2014 04:30:06 -0500 Subject: [PATCH] fix(pipe) if error when write to file -> exeption --- lib/server/pipe.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/server/pipe.js b/lib/server/pipe.js index c509857443..3954c11b19 100644 --- a/lib/server/pipe.js +++ b/lib/server/pipe.js @@ -31,8 +31,9 @@ Util.exec.if(!isFSWrite, function() { pipe(streams, options, callback); - }, function(callback) { - write.on('open', callback); + }, function(fn) { + write.on('open', fn) + .on('error', callback); }); }