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 CC connection bugs #2367

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

aMannus
Copy link
Contributor

@aMannus aMannus commented Jan 18, 2023

Fixes #2122
Fixes #2121

Thanks to @dcvz for making these fixes.

Build Artifacts

@aMannus aMannus marked this pull request as ready for review January 18, 2023 14:28
Copy link
Contributor

@dcvz dcvz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :trollface:

@@ -101,7 +101,7 @@ void CrowdControl::Disable() {

void CrowdControl::ListenToServer() {
while (isEnabled) {
while (!connected) {
while (!connected && isEnabled) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this check being added here? shouldn't it be handled by the outer while loop?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nevermind, i read this as if not while

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, because this is an inner while that never reaches the outside while its in its own loop.. in this case a user might still disable CC before any connection is established, so we want to exit. Otherwise you get stuck in an infinite loop.

@dcvz dcvz merged commit a5f7478 into HarbourMasters:develop-bradley Jan 18, 2023
@aMannus aMannus deleted the cc-connection-fixes branch January 23, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants