forked from mirror/websocket
check for nil-ness of Dialer.TLSClientConfig before attempting to run the check
This commit is contained in:
parent
464f255e78
commit
a410921e1d
|
@ -186,6 +186,7 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h
|
|||
return nil, nil, errMalformedURL
|
||||
}
|
||||
|
||||
if d.TLSClientConfig != nil {
|
||||
for _, proto := range d.TLSClientConfig.NextProtos {
|
||||
if proto != "http/1.1" {
|
||||
return nil, nil, fmt.Errorf(
|
||||
|
@ -195,6 +196,7 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h
|
|||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
req := &http.Request{
|
||||
Method: http.MethodGet,
|
||||
|
|
Loading…
Reference in New Issue