mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +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 {
|
func checkClientHealth(client *embed.Client) ClientHealth {
|
||||||
|
if client == nil {
|
||||||
|
return ClientHealth{
|
||||||
|
Healthy: false,
|
||||||
|
Error: "client not initialized",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
status, err := client.Status()
|
status, err := client.Status()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ClientHealth{
|
return ClientHealth{
|
||||||
|
|||||||
Reference in New Issue
Block a user