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

Reject pending commands if connection is closed #52

Merged
merged 2 commits into from
Jun 18, 2018

Conversation

clue
Copy link
Contributor

@clue clue commented Jun 16, 2018

This PR ensures that all outstanding commands will be rejected if the connection is closed.

As a first step, this PR performs a minor refactoring to avoid accessing an internal queue that only ever has a maximum of one single command anyway. This is not a BC break because its outside behavior is preserved (tests are not affected). Additionally, it ensures that the current command and any queued ones will be properly rejected with an error event the connection is closed.

Resolves / closes #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.

unsafe 'dequeue' in React\MySQL\Protocal\Parser::onError()
3 participants