mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 15:26:40 +00:00
Skip nil client for health
This commit is contained in:
@@ -340,6 +340,13 @@ func NewServer(addr string, checker *Checker, logger *log.Logger, metricsHandler
|
||||
}
|
||||
|
||||
func checkClientHealth(client *embed.Client) ClientHealth {
|
||||
if client == nil {
|
||||
return ClientHealth{
|
||||
Healthy: false,
|
||||
Error: "client not initialized",
|
||||
}
|
||||
}
|
||||
|
||||
status, err := client.Status()
|
||||
if err != nil {
|
||||
return ClientHealth{
|
||||
|
||||
Reference in New Issue
Block a user