mirror of
https://github.com/netbirdio/netbird.git
synced 2025-01-21 13:28:54 +01:00
Add warning log when saving a peer with false status
This commit is contained in:
parent
45fd1e9c21
commit
b7da43a91a
@ -275,6 +275,12 @@ 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",
|
||||||
|
peerID, peerCopy.Status.Connected, peerStatus.Connected,
|
||||||
|
debug.Stack())
|
||||||
|
}
|
||||||
|
|
||||||
fieldsToUpdate := []string{
|
fieldsToUpdate := []string{
|
||||||
"peer_status_last_seen", "peer_status_connected",
|
"peer_status_last_seen", "peer_status_connected",
|
||||||
"peer_status_login_expired", "peer_status_required_approval",
|
"peer_status_login_expired", "peer_status_required_approval",
|
||||||
|
Loading…
Reference in New Issue
Block a user