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 drain event of ThroughStream to handle potential race condition #171

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

clue
Copy link
Member

@clue clue commented Sep 24, 2023

This changeset fixes a potential race condition that may happen for the drain event of ThroughStream. This is more of an edge case when pausing/resuming/closing immediately after flushing any buffers and is unlikely to have significant impact on existing code out in the wild.

The changes look relatively simple, most of the work went into making sure this is fully covered by additional tests for such edge cases. The test suite confirms this does not affect any of the existing behavior, so this should be safe to apply.

@clue clue added the bug label Sep 24, 2023
@clue clue added this to the v1.4.0 milestone Sep 24, 2023
@clue clue force-pushed the drain-throughstream branch from d6accb8 to 873679e Compare September 25, 2023 07:01
@clue clue force-pushed the drain-throughstream branch from 873679e to 6273e35 Compare September 25, 2023 13:44
@WyriHaximus WyriHaximus merged commit 78a6ea5 into reactphp:1.x Sep 25, 2023
15 checks passed
@clue clue deleted the drain-throughstream branch September 25, 2023 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants