fix linter issues

Signed-off-by: Dmitri Dolguikh <dmitri.external@netbird.io>
This commit is contained in:
Dmitri Dolguikh
2026-08-20 16:23:12 +02:00
parent cf4b9f8333
commit 218febdf79

View File

@@ -449,7 +449,10 @@ func (s *Server) handleUpdates(ctx context.Context, accountID string, peerKey wg
}
}
s.accountManager.RefreshPeerLastSeen(ctx, accountID, peer.ID)
if err := s.accountManager.RefreshPeerLastSeen(ctx, accountID, peer.ID); err != nil {
log.WithContext(ctx).Debugf("error updating peer's last seen timestamp %s: %v", peerKey.String(), err)
return err
}
// Timer expired - quiet period reached, send pending updates if any
case <-debouncer.TimerChannel():
@@ -465,10 +468,16 @@ func (s *Server) handleUpdates(ctx context.Context, accountID string, peerKey wg
}
}
s.accountManager.RefreshPeerLastSeen(ctx, accountID, peer.ID)
if err := s.accountManager.RefreshPeerLastSeen(ctx, accountID, peer.ID); err != nil {
log.WithContext(ctx).Debugf("error updating peer's last seen timestamp %s: %v", peerKey.String(), err)
return err
}
case <-ticker.C:
s.accountManager.RefreshPeerLastSeen(ctx, accountID, peer.ID)
if err := s.accountManager.RefreshPeerLastSeen(ctx, accountID, peer.ID); err != nil {
log.WithContext(ctx).Debugf("error updating peer's last seen timestamp %s: %v", peerKey.String(), err)
return err
}
// condition when client <-> server connection has been terminated
case <-srv.Context().Done():