2

I upload the file with a readstream via busboy module, if app gets the "limit" event - app sends an error and deletes the uploaded file, and, accordingly, completes the download.

I'm stopping the download like this

  file.on('limit', async () => {
    removeFile(organizationId, fileName); 
    req.unpipe(busboy);
    next(new Error('File too large'));
  });

Andon Windows we catch the error:

Error: read ECONNRESET
 at TCP.onStreamRead (node: internal / stream_base_commons: 211: 20)
 at TCP.callbackTrampoline (node: internal / async_hooks: 130: 17)

Everything works on Linux without problems.

Nothing else arrives in the trace, all debugging attempts are in vain. This shit is noted exclusively on Windows.

Any ideas what might be causing it?

0 Answers0