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

Close the underlying stream when closing the stream #107

Merged

Conversation

WyriHaximus
Copy link
Member

Currently unlike ReadableResourceStream the WritableResourceStream doesn't automatically closes the underlying stream resource with fclose. This PR aims to add that, but as of creating this PR two tests fail, purposely not updated tests to discuss how to handle those here before fixing them.

@clue
Copy link
Member

clue commented Jun 12, 2017

Thanks for spotting this bug and filing this PR! 👍 I agree that your suggested fix makes sense and the two tests need to be updated because they rely on some rather pointless assumptions.

One possible option would be using a writer filter function instead of rewinding after close. Does this make sense to you?

@clue clue added this to the v0.7.2 milestone Jun 12, 2017
@WyriHaximus
Copy link
Member Author

One possible option would be using a writer filter function instead of rewinding after close. Does this make sense to you?

The idea makes sense, not sure yet how to implement that right now.

@WyriHaximus
Copy link
Member Author

Doh your package make it very easy ❤️ !

Ping @clue and @jsor, tests have been fixed and are green across the board.

@WyriHaximus WyriHaximus merged commit aac95e6 into reactphp:master Jun 14, 2017
@WyriHaximus
Copy link
Member Author

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants