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 QueryChannelImpl healthcheck #219

Closed
wants to merge 1 commit into from
Closed

Conversation

CodeDrivenMitch
Copy link
Contributor

@CodeDrivenMitch CodeDrivenMitch commented Aug 1, 2022

In normal situations, the current implementation of QueryChannelImpl.isReady() is sufficient. However, in some very rare cases the channel stays connected, while being unable to register query handlers. Despite the failing registering of the handlers the isReady() check wrongfully believes it's health, since the subscriptionsCompleted is never set to false in case of errors.

This PR fixes this problem by setting it to false in the case of errors during registering, and setting it to false during disconnection. The boolean is then determined again when connecting and succeeding.

Note: During a normal disconnect, the outbound stream would be set to null, so it normally works in the way it should. This is for the abnormal situation where the stream is not null, but it's not connected as well.

@sonarcloud
Copy link

sonarcloud bot commented Aug 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@CodeDrivenMitch
Copy link
Contributor Author

Closing this PR in favor of #220 which is targeted at the correct 4.5.x branch

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.

None yet

3 participants