Check error

This commit is contained in:
Sleeyax 2022-05-14 15:47:30 +02:00
parent 502bd65db8
commit adb13885c2
1 changed files with 3 additions and 0 deletions

View File

@ -343,6 +343,9 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h
if d.ProxyTLSConnection != nil && d.Proxy != nil { if d.ProxyTLSConnection != nil && d.Proxy != nil {
// If we are connected to a proxy, perform the TLS handshake through the existing tunnel // If we are connected to a proxy, perform the TLS handshake through the existing tunnel
netConn, err = d.ProxyTLSConnection(ctx, netConn) netConn, err = d.ProxyTLSConnection(ctx, netConn)
if err != nil {
return nil, nil, err
}
} else if d.NetDialTLSContext == nil { } else if d.NetDialTLSContext == nil {
// If NetDialTLSContext is set, assume that the TLS handshake has already been done // If NetDialTLSContext is set, assume that the TLS handshake has already been done