From 44ee0e2e8a05d3f82b477f7aa9d1d8c79430b2af Mon Sep 17 00:00:00 2001 From: "Matthew R. Kasun" Date: Fri, 4 Feb 2022 18:24:46 -0500 Subject: [PATCH] fix error messages --- netclient/functions/daemon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netclient/functions/daemon.go b/netclient/functions/daemon.go index 6201e682..b09b387b 100644 --- a/netclient/functions/daemon.go +++ b/netclient/functions/daemon.go @@ -502,7 +502,7 @@ func Checkin(ctx context.Context, cfg *config.ClientConfig, network string) { } } if err := pingServer(cfg); err != nil { - ncutils.PrintLog("could not ping server"+err.Error(), 0) + ncutils.PrintLog("could not ping server "+err.Error(), 0) } Hello(cfg, network) // ncutils.Log("Checkin complete") @@ -604,7 +604,7 @@ func pingServer(cfg *config.ClientConfig) error { pinger.Timeout = 2 * time.Second pinger.Run() stats := pinger.Statistics() - if stats.PacketLoss != 100 { + if stats.PacketLoss == 100 { ncutils.PrintLog(fmt.Sprintf("lost packets when pinging server: packets sent:%d packets recieved: %d", stats.PacketsSent, stats.PacketsRecv), 1) return errors.New("ping error") }