Fix wrong time precision in bootstrapping timeout

The timeout is in millisecond, not second.
This commit is contained in:
Cuong Manh Le authored and Cuong Manh Le committed 2023-03-08 10:19:49 +07:00
1 parent 1a40767cb7
commit 018f6651c1
1 file changed
+1 -1
+1 -1
View File
@@ -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()