Skip to content

fix: invert addWatcher error check and prevent HTTP/TLS server fallthrough in fdbkubernetesmonitor#13045

Open
Ronitsabhaya75 wants to merge 1 commit intoapple:mainfrom
Ronitsabhaya75:network-bug
Open

fix: invert addWatcher error check and prevent HTTP/TLS server fallthrough in fdbkubernetesmonitor#13045
Ronitsabhaya75 wants to merge 1 commit intoapple:mainfrom
Ronitsabhaya75:network-bug

Conversation

@Ronitsabhaya75
Copy link
Copy Markdown
Contributor

addWatcher returned nil on error and retried on success due to err != nil instead of err == nil. This caused file-watch re-establishment to silently fail after ConfigMap remounts, permanently stopping config change detection.

When TLS is configured, the goroutine falls through from the HTTPS block to also start a plain HTTP server on the same port. Added return after the HTTPS block to make the HTTPS-or-HTTP intent explicit.

Code-Reviewer Section

The general pull request guidelines can be found here.

Please check each of the following things and check all boxes before accepting a PR.

  • The PR has a description, explaining both the problem and the solution.
  • The description mentions which forms of testing were done and the testing seems reasonable.
  • Every function/class/actor that was touched is reasonably well documented.

For Release-Branches

If this PR is made against a release-branch, please also check the following:

  • This change/bugfix is a cherry-pick from the next younger branch (younger release-branch or main if this is the youngest branch)
  • There is a good reason why this PR needs to go into a release branch and this reason is documented (either in the description above or in a linked GitHub issue)

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.

1 participant