Skip to content

Conversation

@BlakeB415
Copy link

@BlakeB415 BlakeB415 commented Nov 3, 2021

Node: v17.0.0
OS: Windows 11

The end callback is never called on some smaller files causing the pipeline to stall. This seemed to fix it.

@timothyallan
Copy link

WHOOO What a lifesaver this was, thanks @BlakeB415. Spent ages trying to figure out why our dev boxes were hanging randomly with multer, but not production. This fixed it.

@AhmedAlSaey
Copy link

Can this PR be approved please?

@KostyaTretyak
Copy link

KostyaTretyak commented Jul 30, 2024

Although I don't have deep knowledge in streams, but I feel that the following example will be more correct:

_flush(cb) {
    this[kResult].finally(() => {
      if (this[kStream] != null) {
        this[kStream].end();
      }
      cb(null);
    });
  }

KostyaTretyak added a commit to ts-stack/multer that referenced this pull request Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants