mirror of https://github.com/gorilla/websocket.git
include the likely cause of the error in the error message
This commit is contained in:
parent
8a0b8d46a3
commit
464f255e78
|
@ -188,7 +188,11 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h
|
||||||
|
|
||||||
for _, proto := range d.TLSClientConfig.NextProtos {
|
for _, proto := range d.TLSClientConfig.NextProtos {
|
||||||
if proto != "http/1.1" {
|
if proto != "http/1.1" {
|
||||||
return nil, nil, fmt.Errorf("protocol %q is currently not supported", proto)
|
return nil, nil, fmt.Errorf(
|
||||||
|
`protocol %q was given but is not supported;
|
||||||
|
sharing tls.Config with net/http Transport can cause this error`,
|
||||||
|
proto,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue