Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when file.on('data') event timeouts, the case isn't handled properly. #202

Closed
zzxoto opened this issue Mar 13, 2020 · 1 comment
Closed
Labels

Comments

@zzxoto
Copy link

zzxoto commented Mar 13, 2020

Steps to reproduce.

use following options

{
  debug: true, 
  uploadTimeout: 0,
  useTempFiles: true
}

Following error is logged:

...(some other logs/errors i have omitted)...
UnhandledPromiseRejectionWarning: Error [ERR_STREAM_WRITE_AFTER_END]: write after end
...(some other logs/errors I have omitted)...
Error write temp file error:Error [ERR_STREAM_WRITE_AFTER_END]: write after end
Uploading sampleFile->Hallelujah_chorus.wma, bytes:114529...
Error write temp file error:Error [ERR_STREAM_WRITE_AFTER_END]: write after end

What i gather is that temp file gets closed in a timeout, and upon next data event, trying to write on previously closed temp file creates this crash.

@RomanBurunkov
Copy link
Collaborator

Have added a checks to not start a timer in case of zero uploadTimeout.

'[ERR_STREAM_WRITE_AFTER_END]: write after end' it is the same as #192.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants