Skip to content

Exit when the HTTP server fails to start - #1047

Draft
Nameless-Monster-Nerd wants to merge 1 commit into
glanceapp:mainfrom
Nameless-Monster-Nerd:codex/fix-server-start-exit
Draft

Exit when the HTTP server fails to start#1047
Nameless-Monster-Nerd wants to merge 1 commit into
glanceapp:mainfrom
Nameless-Monster-Nerd:codex/fix-server-start-exit

Conversation

@Nameless-Monster-Nerd

Copy link
Copy Markdown

Fixes #950.

Server startup errors from the watched-config path now flow back to serveApp through a buffered error channel. This makes Main return a non-zero exit code for failures such as an occupied or unavailable bind address instead of logging the error and waiting forever. Initial config and application construction failures now use the same error path.

Tests:

  • go test ./internal/glance -run TestStartServerAndReportReturnsStartupError -count=1
  • go test ./internal/glance -count=1
  • go vet ./internal/glance
  • git diff --check

AI disclosure: I used Codex to help investigate, implement, and test this change. I reviewed the final diff and test results.

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.

Hangs on startServer failures

1 participant