Comparing version 3.0.8 to 3.0.9
@@ -32,2 +32,3 @@ 'use strict'; | ||
let writeOpened = false; | ||
let writeClosed = false; | ||
@@ -50,2 +51,3 @@ const streams = allStreams.slice(); | ||
rm('finish', write, onWriteFinish); | ||
rm('close', write, onWriteClose); | ||
rm('error', read, onReadError); | ||
@@ -60,2 +62,3 @@ rm('end', read, onReadEnd); | ||
write.on('open', onWriteOpen); | ||
write.on('close', onWriteClose); | ||
@@ -73,2 +76,7 @@ setListeners(streams, onError); | ||
function onWriteClose() { | ||
writeClosed = true; | ||
onResult(); | ||
} | ||
function onWriteError(error) { | ||
@@ -114,3 +122,3 @@ writeError = true; | ||
const isWriteOpened = isFsWriteStream ? writeOpened : true; | ||
const bothFinish = end && finish && isWriteOpened; | ||
const bothFinish = end && finish && (isWriteOpened || writeClosed) | ||
@@ -117,0 +125,0 @@ if (writeError && end) |
{ | ||
"name": "pipe-io", | ||
"version": "3.0.8", | ||
"version": "3.0.9", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -5,0 +5,0 @@ "description": "Pipe streams and handle events", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13403
134