Open amber-cd opened 5 years ago
Hmm... I haven't tested in node 10 yet. I still need to finish fixing the odd behavior when listing files with relatives paths, so I'll add node 10 support along with it. It'll be a few days before I have time to tackle it but look into why the stream isn't piping through.
Sorry for the delay in testing this.
Just tested in node 10.15.3 and a bunch of other versions. I'm not exactly sure what gives but calling stream.pipe() should resume the stream and start the transfer. However starting in node 10.0.0 this longer works as expected, but calling stream.read() after stream.pipe() resolve the issue.
I'm not sure if this a bug in node or the underlying ssh2-streams package, or by design some how.
let me know that solve your problem.
Thanks,
Dave
Hrm.
Both
stream.pipe(writeStream);
writeStream.write(stream.read());
stream.pipe(writeStream);
stream.read();
do indeed seem to work around this issue. It's a bit unintuitive, and I'm running into a separate issue with GCS, but I think it should work for these purposes. Thank you!
We recently upgraded from an older version of node to Node 10, and ever since I've been experiencing an issue with a read stream from a remote server just not working when attempting to pipe from the SFTP read stream.
An example of our setup:
In our old Node installation, this logs out fine:
Checking the local FS shows the file with all the expected data.
But in Node 10, the log is just:
Then... nothing else. It just stops, and the local file is empty.