Fix wrong time precision in bootstrapping timeout

The timeout is in millisecond, not second.
This commit is contained in:
Cuong Manh Le
2023-03-08 10:15:34 +07:00
committed by Cuong Manh Le
parent 1a40767cb7
commit 018f6651c1

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()