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

fix: don't close while writing #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ronag
Copy link
Contributor

@ronag ronag commented Aug 29, 2021

Fixes: #98

@mcollina
Copy link
Member

We rely on this feature when shutting down the logger during process.on('exit'): in this case the write will never finish, so we can't wait. Possibly this is ok, the fd will be closed by the process closing... wdyt?

@mcollina
Copy link
Member

Could you add a test? Mocking is ok.

@ronag
Copy link
Contributor Author

ronag commented Aug 30, 2021

We rely on this feature when shutting down the logger during process.on('exit'): in this case the write will never finish, so we can't wait. Possibly this is ok, the fd will be closed by the process closing... wdyt?

process closing should be sufficient.

@ronag
Copy link
Contributor Author

ronag commented Aug 30, 2021

Could you add a test? Mocking is ok.

Sure. Was hoping the assertion would be sufficient (tests fail now without the fix). But I can do a test as well.

@ronag ronag closed this Aug 30, 2021
@ronag ronag reopened this Aug 30, 2021
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.

actualClose can close fd while writing
2 participants