From fa81eabc292c72d7cb9f01f55e2e89c0935409d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 6 Aug 2024 12:23:33 +0800 Subject: [PATCH] ntp: Fix a bad context usage --- common/ntp/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/ntp/service.go b/common/ntp/service.go index 16d6671..c9f2ee8 100644 --- a/common/ntp/service.go +++ b/common/ntp/service.go @@ -141,7 +141,7 @@ func (s *Service) update() error { if s.timeout > 0 { ctx, cancel = context.WithTimeout(ctx, s.timeout) } - response, err := Exchange(s.ctx, s.dialer, s.server) + response, err := Exchange(ctx, s.dialer, s.server) if cancel != nil { cancel() }