mirror of
https://github.com/fullstorydev/grpcurl.git
synced 2026-05-23 04:01:45 +03:00
oops -- remove some unused code
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user