You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am creating an array of fs.createReadableStreams and putting them into a message. This message is then passed to my jschan/graft microservice, which pipes each file it into local fs.createWritableStreams.
Data, end, and finish events fire correctly when I am using the in-memory graftJS, and also when using spdy on localhost with a small file (< 3746 bytes). However, all three of the same events fail to fire when sending larger files over spdy jschan.
Node version is v0.10.35
Sender:
// Convert filePaths into filestreams that can be sent via graft jschanif(msg.filePaths){varfileStreams={};msg.filePaths.forEach(function(filePath){varfileName=path.basename(filePath);//var zlibCompress = zlib.createDeflate();varfileStream=fs.createReadStream(filePath);fileStream.resume();fileStream.on('data',function(chunk){console.log('got %d bytes of data',chunk.length);});fileStream.on('end',function(){console.log('end');});fileStreams[fileName]=fileStream;});msg.fileStreams=fileStreams;}
Receiver:
// Save remote fileStreams to local temp directory.async.map(Object.keys(msg.fileStreams),function_writeStream(fileName,cb){varfileStream=msg.fileStreams[fileName];varoutPath=path.join(dirPath,fileName);varoutStream=fs.createWriteStream(outPath);console.log(outPath);// end event does not firefileStream.resume();fileStream.on('data',function(chunk){console.log('got %d bytes of data',chunk.length);});fileStream.on('end',function(){console.log('end');});// finish event does not fire fileStream.pipe(outStream).on('error',function(err){setImmediate(cb,err);}).on('finish',function(){setImmediate(cb,null,outPath);});},function(err,filePaths){if(err){cleanupTmp();throwerr;}
...
});
Would really appreciate the help nailing this bug down.
The text was updated successfully, but these errors were encountered:
I am creating an array of fs.createReadableStreams and putting them into a message. This message is then passed to my jschan/graft microservice, which pipes each file it into local fs.createWritableStreams.
Data, end, and finish events fire correctly when I am using the in-memory graftJS, and also when using spdy on localhost with a small file (< 3746 bytes). However, all three of the same events fail to fire when sending larger files over spdy jschan.
Node version is v0.10.35
Sender:
Receiver:
Would really appreciate the help nailing this bug down.
The text was updated successfully, but these errors were encountered: