diff --git a/receiver/chronyreceiver/internal/chrony/client.go b/receiver/chronyreceiver/internal/chrony/client.go index 88e5015d9f42..4ed1ae7486d9 100644 --- a/receiver/chronyreceiver/internal/chrony/client.go +++ b/receiver/chronyreceiver/internal/chrony/client.go @@ -97,8 +97,6 @@ func (c *client) getContext(ctx context.Context) (context.Context, context.Cance if c.timeout == 0 { return context.WithCancel(ctx) } - clock := clockwork.FromContext(ctx) - clock.After(c.timeout) - newCtx := clockwork.AddToContext(ctx, clock) - return context.WithCancel(newCtx) + + return context.WithTimeout(ctx, c.timeout) }