diff --git a/internal/rest/client.go b/internal/rest/client.go index 9d264fc1b..9425bc41b 100644 --- a/internal/rest/client.go +++ b/internal/rest/client.go @@ -148,7 +148,7 @@ func (c *Client) Call(ctx context.Context, method string, values url.Values, bod atomic.AddUint64(&networkErrsCounter, 1) } if c.MarkOffline() { - logger.LogIf(ctx, fmt.Errorf("Marking %s temporary offline; caused by %w", c.url.String(), err)) + logger.LogIf(context.Background(), fmt.Errorf("Marking %s temporary offline; caused by %w", c.url.String(), err)) } } return nil, &NetworkError{err} @@ -171,7 +171,7 @@ func (c *Client) Call(ctx context.Context, method string, values url.Values, bod // fully it should make sure to respond with '412' // instead, see cmd/storage-rest-server.go for ideas. if c.HealthCheckFn != nil && resp.StatusCode == http.StatusPreconditionFailed { - logger.LogIf(ctx, fmt.Errorf("Marking %s temporary offline; caused by PreconditionFailed with disk ID mismatch", c.url.String())) + logger.LogIf(context.Background(), fmt.Errorf("Marking %s temporary offline; caused by PreconditionFailed with disk ID mismatch", c.url.String())) c.MarkOffline() } defer xhttp.DrainBody(resp.Body) @@ -183,7 +183,7 @@ func (c *Client) Call(ctx context.Context, method string, values url.Values, bod atomic.AddUint64(&networkErrsCounter, 1) } if c.MarkOffline() { - logger.LogIf(ctx, fmt.Errorf("Marking %s temporary offline; caused by %w", c.url.String(), err)) + logger.LogIf(context.Background(), fmt.Errorf("Marking %s temporary offline; caused by %w", c.url.String(), err)) } } return nil, err