mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-13 10:21:10 +01:00
Add warning log when saving a peer with false status
This commit is contained in:
parent
b7da43a91a
commit
50642f5ef3
@ -275,11 +275,9 @@ func (s *SqlStore) SavePeerStatus(accountID, peerID string, peerStatus nbpeer.Pe
|
|||||||
var peerCopy nbpeer.Peer
|
var peerCopy nbpeer.Peer
|
||||||
peerCopy.Status = &peerStatus
|
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",
|
||||||
log.WithContext(context.Background()).Tracef("saving an peer: %s with false status. PeerCopy %v, Arg: %v, Trace: %v",
|
peerID, peerCopy.Status.Connected, peerStatus.Connected,
|
||||||
peerID, peerCopy.Status.Connected, peerStatus.Connected,
|
debug.Stack())
|
||||||
debug.Stack())
|
|
||||||
}
|
|
||||||
|
|
||||||
fieldsToUpdate := []string{
|
fieldsToUpdate := []string{
|
||||||
"peer_status_last_seen", "peer_status_connected",
|
"peer_status_last_seen", "peer_status_connected",
|
||||||
|
Loading…
Reference in New Issue
Block a user