diff --git a/grpcurl.go b/grpcurl.go index eb0cf00..7680535 100644 --- a/grpcurl.go +++ b/grpcurl.go @@ -854,9 +854,6 @@ func BlockingDial(ctx context.Context, address string, creds credentials.Transpo // grpc.Dial doesn't provide any information on permanent connection errors (like // TLS handshake failures). So in order to provide good error messages, we need a // custom dialer that can provide that info. That means we manage the TLS handshake. - var wg sync.WaitGroup - wg.Add(1) - var once sync.Once result := make(chan interface{}, 1) writeResult := func(res interface{}) { @@ -868,7 +865,6 @@ func BlockingDial(ctx context.Context, address string, creds credentials.Transpo } dialer := func(address string, timeout time.Duration) (net.Conn, error) { - once.Do(func() { wg.Done() }) ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel() conn, err := (&net.Dialer{Cancel: ctx.Done()}).Dial("tcp", address)