X Tutup
Skip to content

stream: don't emit drain if ended#29086

Closed
ronag wants to merge 1 commit intonodejs:masterfrom
nxtedition:stream-write-drain
Closed

stream: don't emit drain if ended#29086
ronag wants to merge 1 commit intonodejs:masterfrom
nxtedition:stream-write-drain

Conversation

@ronag
Copy link
Copy Markdown
Member

@ronag ronag commented Aug 11, 2019

Don't emit 'drain' if the stream has been ended. 'drain' should only be emitted if the stream wants more data.

See, https://nodejs.org/api/stream.html#stream_event_drain.

the 'drain' event will be emitted when it is appropriate to resume writing data to the stream.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

NOTE TO SELF: After this is merged look into emitting 'drain' after state.length < hwm instead of state.length === 0.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. stream Issues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

X Tutup