oops -- remove some unused code
This commit is contained in:
parent
91fb94b700
commit
1eec3bcbd6
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue