From 50642f5ef338e07f2a23b54e5ca804445e722204 Mon Sep 17 00:00:00 2001 From: bcmmbaga Date: Thu, 25 Jul 2024 20:11:34 +0300 Subject: [PATCH] Add warning log when saving a peer with false status --- management/server/sql_store.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/management/server/sql_store.go b/management/server/sql_store.go index 764f6d87a..f63e25d3f 100644 --- a/management/server/sql_store.go +++ b/management/server/sql_store.go @@ -275,11 +275,9 @@ func (s *SqlStore) SavePeerStatus(accountID, peerID string, peerStatus nbpeer.Pe var peerCopy nbpeer.Peer peerCopy.Status = &peerStatus - if !peerCopy.Status.Connected { - log.WithContext(context.Background()).Tracef("saving an peer: %s with false status. PeerCopy %v, Arg: %v, Trace: %v", - peerID, peerCopy.Status.Connected, peerStatus.Connected, - debug.Stack()) - } + log.WithContext(context.Background()).Tracef("saving an peer: %s with false status. PeerCopy %v, Arg: %v, Trace: %v", + peerID, peerCopy.Status.Connected, peerStatus.Connected, + debug.Stack()) fieldsToUpdate := []string{ "peer_status_last_seen", "peer_status_connected",