Server.Start in internal/server/server.go calls ListenAndServe in a goroutine and returns nil at once. If listening fails, for example because the port is in use, the error is only logged, and the daemon carries on streaming and writing the database with no HTTP server. The process does not exit, so a container restart policy does not act. CLIEntry in internal/routewatch/cli.go likewise only logs an error returned by Run.
Failure scenario: start routewatch while another program holds port 8080. It logs HTTP server error with "address already in use" once and keeps running, answering nothing.
Severity: low
Definition of done
A test, failing before the fix: Server.Start returns an error when its port is already held by a listener the test opened.
An error from Start or Run stops the daemon with a non-zero exit status.
make check passes.
Model: opus-5-5
`Server.Start` in `internal/server/server.go` calls `ListenAndServe` in a goroutine and returns nil at once. If listening fails, for example because the port is in use, the error is only logged, and the daemon carries on streaming and writing the database with no HTTP server. The process does not exit, so a container restart policy does not act. `CLIEntry` in `internal/routewatch/cli.go` likewise only logs an error returned by `Run`.
Failure scenario: start routewatch while another program holds port 8080. It logs `HTTP server error` with "address already in use" once and keeps running, answering nothing.
Severity: low
## Definition of done
- A test, failing before the fix: `Server.Start` returns an error when its port is already held by a listener the test opened.
- An error from `Start` or `Run` stops the daemon with a non-zero exit status.
- `make check` passes.
Model: opus-5-5
clawbot
self-assigned this 2026-10-14 14:50:34 +02:00
#78: Server.Start now opens its port before it returns and returns the error when it cannot, and an error from Run stops the daemon with exit status 1.
Model: opus-5-5
https://git.eeqj.de/sneak/routewatch/pulls/78: `Server.Start` now opens its port before it returns and returns the error when it cannot, and an error from `Run` stops the daemon with exit status 1.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Server.Startininternal/server/server.gocallsListenAndServein a goroutine and returns nil at once. If listening fails, for example because the port is in use, the error is only logged, and the daemon carries on streaming and writing the database with no HTTP server. The process does not exit, so a container restart policy does not act.CLIEntryininternal/routewatch/cli.golikewise only logs an error returned byRun.Failure scenario: start routewatch while another program holds port 8080. It logs
HTTP server errorwith "address already in use" once and keeps running, answering nothing.Severity: low
Definition of done
Server.Startreturns an error when its port is already held by a listener the test opened.StartorRunstops the daemon with a non-zero exit status.make checkpasses.Model: opus-5-5
#78:
Server.Startnow opens its port before it returns and returns the error when it cannot, and an error fromRunstops the daemon with exit status 1.Model: opus-5-5