fix(cli): avoid warning when HTTP log server is not yet available

Treat "socket missing" (ENOENT) and connection refused as expected when
probing the log server, and only log when the error indicates something
unexpected. This prevents noisy warnings when the log server has not
started yet.

Discover while doing captive portal tests.
This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2026-04-30 19:19:19 +07:00
1 parent f1b93c81bc
commit 878b3d7920
2 files changed
+11 -1

No files matched your search

+1 -1
View File
@@ -238,7 +238,7 @@ func run(appCallback *AppCallback, stopCh chan struct{}) {
// Test if HTTP log server is available
if err := hlc.Ping(); err != nil {
if !errConnectionRefused(err) {
if !errLogServerUnavailable(err) {
p.Warn().Err(err).Msg("Unable to ping log server")
}
} else {