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

Add close() method to force-close the connection #76

Merged
merged 1 commit into from
Sep 9, 2018

Conversation

clue
Copy link
Contributor

@clue clue commented Sep 6, 2018

The original close() method was renamed to quit() (via #65) to emphasize this method actually sends a "quit" command over the wire once all queued commands are done (it waits for all queued commands, which is also why it now returns a promise). It does not force-close the connection like the stream close() method commonly used in @reactphp does. This PR adds a new close(): void method which immediately force-closes the underlying connection and rejects all outstanding commands.

Being a new addition to the ConnectionInterface, this PR is technically a BC break. Empirical evidence suggests this should not affect most consumers (BC is limited due to #65 anyway).

Builds on top of #69 and #65

@clue clue added this to the v0.4.0 milestone Sep 6, 2018
@jsor jsor merged commit b66ed37 into friends-of-reactphp:master Sep 9, 2018
@clue clue deleted the close branch September 9, 2018 09:22
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