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

Always emit drain after flush() #180

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Always emit drain after flush() #180

wants to merge 4 commits into from

Conversation

mcollina
Copy link
Member

@mcollina mcollina commented Sep 29, 2023

This can unfortunately lead to pino to not call end() on the stream.

https://github.com/pinojs/pino/blob/28819c3a6324f8d26e7653cf08b35156bf9318d2/lib/tools.js#L274-L276

Signed-off-by: Matteo Collina <[email protected]>
Signed-off-by: Matteo Collina <[email protected]>
index.js Outdated Show resolved Hide resolved
Signed-off-by: Matteo Collina <[email protected]>
Copy link
Contributor

@ronag ronag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit weird though? drain should only occur if write has returned false? Isn't this more of a pino bug?

@mcollina
Copy link
Member Author

I'm currently trying to debug some flaky tests downstream. This was something I saw happening and might be correlated.

Signed-off-by: Matteo Collina <[email protected]>
@mcollina mcollina marked this pull request as draft September 29, 2023 09:46
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.

2 participants