Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
buffer chunk after flushing buffer in write if paused
4c5a106 handled a convoluted case where there is a chunk in the buffer AND we're in a flowing state during a write call which caused out of order writes. The fix was to flush the buffer before emitting the new chunk, but it didn't account for destinations pausing the stream after flushing part of the buffer. This caused issues in npm/pacote/npm-registry-fetch. That specific issue is demonstrated in everett1992/make-fetch-happen-tar-extract-error and occurs when make-fetch-happen res.body is piped to a tar.extract stream. Fixes isaacs#27 npm/cli#3884 make-fetch-happen#63
- Loading branch information