diff --git a/nbhttp/websocket/dialer.go b/nbhttp/websocket/dialer.go index ef65c5cc..7dbf0860 100644 --- a/nbhttp/websocket/dialer.go +++ b/nbhttp/websocket/dialer.go @@ -185,8 +185,8 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h nbc, ok := conn.(*nbio.Conn) if !ok { - nbhttpConn, ok := conn.(*nbhttp.Conn) - if !ok { + nbhttpConn, ok2 := conn.(*nbhttp.Conn) + if !ok2 { err = ErrBadHandshake notifyResult(err) return