Skip to content

Fix CC connection bugs#2367

Merged
dcvz merged 1 commit intoHarbourMasters:develop-bradleyfrom
aMannus:cc-connection-fixes
Jan 18, 2023
Merged

Fix CC connection bugs#2367
dcvz merged 1 commit intoHarbourMasters:develop-bradleyfrom
aMannus:cc-connection-fixes

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:

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.

3 participants