From 1eec3bcbd602c5dad42c9ae7aafd96712ecb8188 Mon Sep 17 00:00:00 2001 From: Josh Humphries Date: Wed, 13 Dec 2017 15:46:56 -0500 Subject: [PATCH] oops -- remove some unused code --- grpcurl.go | 4 ---- 1 file changed, 4 deletions(-) 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)