fix shutdown method: make sure to callback when write completed immediately

This commit is contained in:
Xiaolu Liu
2014-04-21 16:27:51 +09:00
parent 0c2baa9690
commit 29d941f0a6

View File

@@ -85,6 +85,8 @@ function shutdown(cb) {
file.once('drain', function() { file.once('drain', function() {
file.end(done); file.end(done);
}); });
} else {
file.end(done);
} }
}, cb); }, cb);
} }