From 1be8c16e340e0b4c9f045374f5df51d2a063d698 Mon Sep 17 00:00:00 2001 From: Misha Bragin Date: Mon, 1 Aug 2022 17:52:22 +0200 Subject: [PATCH] Decrease log level on peer status remove (#410) --- client/internal/peer/conn.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/internal/peer/conn.go b/client/internal/peer/conn.go index 3e2739383..c07c5510e 100644 --- a/client/internal/peer/conn.go +++ b/client/internal/peer/conn.go @@ -395,9 +395,12 @@ func (conn *Conn) cleanup() error { peerState := nbStatus.PeerState{PubKey: conn.config.Key} peerState.ConnStatus = conn.status.String() peerState.ConnStatusUpdate = time.Now() + err := conn.statusRecorder.UpdatePeerState(peerState) if err != nil { - log.Warnf("error while updating peer's %s state, err: %v", conn.config.Key, err) + // pretty common error because by that time Engine can already remove the peer and status won't be available. + //todo rethink status updates + log.Debugf("error while updating peer's %s state, err: %v", conn.config.Key, err) } log.Debugf("cleaned up connection to peer %s", conn.config.Key)