From 018f6651c17838ee1e7bcc4a186a17eef2432701 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Wed, 8 Mar 2023 10:15:34 +0700 Subject: [PATCH] Fix wrong time precision in bootstrapping timeout The timeout is in millisecond, not second. --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index 1c9094f..f35a7ff 100644 --- a/config.go +++ b/config.go @@ -182,7 +182,7 @@ func (uc *UpstreamConfig) SetupTransport() { // SetupBootstrapIP manually find all available IPs of the upstream. func (uc *UpstreamConfig) SetupBootstrapIP() error { - ctx, cancel := context.WithTimeout(context.Background(), time.Duration(uc.Timeout)*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), time.Duration(uc.Timeout)*time.Millisecond) defer cancel() uc.mu.Lock()