Skip to content

fix(register): exit when the /ready healthcheck server fails - #102

Merged
robertodauria merged 3 commits into
mainfrom
fix-register-healthcheck-exit
Oct 8, 2026
Merged

robertodauria merged 3 commits into
mainfrom
fix-register-healthcheck-exit

Conversation

@robertodauria

@robertodauria robertodauria commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

The /ready server's http.ListenAndServe runs in a goroutine and its error is discarded: if the listener fails to bind — or dies later (a fatal accept error makes Serve close the listener and return) — the process keeps running and registering while /ready refuses connections forever, with nothing logged.

Wrap it in rtx.Must like every other fatal error in this file, so a dead listener logs the error and exits the process, letting the supervisor restart it.


This change is Reviewable

Comment thread cmd/register/main.go

@bassosimone bassosimone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🐳

@robertodauria
robertodauria merged commit 235c7ea into main Oct 8, 2026
7 checks passed
@robertodauria
robertodauria deleted the fix-register-healthcheck-exit branch October 8, 2026 14:59
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.

2 participants