Skip to content

fix: remove unreachable error check after https goroutine - #7007

Open
iliya-vidrush wants to merge 1 commit into
anomalyco:devfrom
iliya-vidrush:fix/dead-https-error-check
Open

iliya-vidrush wants to merge 1 commit into
anomalyco:devfrom
iliya-vidrush:fix/dead-https-error-check

Conversation

@iliya-vidrush

Copy link
Copy Markdown

Summary

  • Removes an if err != nil block after go http.ListenAndServeTLS(...) that could never run.
  • The err it tested belongs to the enclosing if _, err := os.Stat(keyPath); err == nil, so the branch only executes when it is nil, and go discards the TLS server's own error.
  • No behavior change: the return err inside was unreachable. HTTPS startup failures were already silent and still are.

Validation

  • go build ./... and go vet ./pkg/server pass.

The err it tested was the os.Stat value the branch already proved nil; the go statement discards ListenAndServeTLS's error.

This branch has not been deployed

No deployments
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