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
when there is async/await in the headers event, the next pipe is executed before finalizing event headers
How Do We Reproduce?
constreadableStreamFile=fs.createReadStream('big.csv')constwritableStreamFile=newWritable({objectMode: true,asyncwrite(chunk,encoding,next){console.log('writable')next()}})readableStreamFile.pipe(csv()).on('headers',async(headers)=>{console.log('before headers')forawait(){}// orawaitfecth()console.log('after headers')}).pipe(writableStreamFile)// the output will be:// before headers// writable// after headers
My dream is to arrive at the writable with all the headers event code finalized.
The text was updated successfully, but these errors were encountered:
YuriFontella
changed the title
async/await in event headers not work
async/await in event headers not work as expected
Mar 4, 2023
Expected Behavior
end event headers before executing writable
Actual Behavior
when there is async/await in the headers event, the next pipe is executed before finalizing event headers
How Do We Reproduce?
My dream is to arrive at the writable with all the headers event code finalized.
The text was updated successfully, but these errors were encountered: