mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-28 15:29:09 +01:00
[client] Log Down-while-idle at debug instead of error
Down returns ErrServiceNotUp when the daemon is already idle, e.g. on quit or a repeated Down. That case is harmless, so log it at debug level and reserve the error log for real teardown failures.
This commit is contained in:
@@ -1082,6 +1082,7 @@ func (s *Server) Down(ctx context.Context, _ *proto.DownRequest) (*proto.DownRes
|
|||||||
if err := s.cleanupConnection(); err != nil {
|
if err := s.cleanupConnection(); err != nil {
|
||||||
s.mutex.Unlock()
|
s.mutex.Unlock()
|
||||||
if errors.Is(err, ErrServiceNotUp) {
|
if errors.Is(err, ErrServiceNotUp) {
|
||||||
|
log.Debugf("Down called while service not up: %v", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
log.Errorf("failed to shut down properly: %v", err)
|
log.Errorf("failed to shut down properly: %v", err)
|
||||||
|
|||||||
Reference in New Issue
Block a user