Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conn.go
Original file line number Diff line number Diff line change
@@ -113,8 +113,7 @@ func (d *DialOptions) dial(urlStr string) (*BaseClient, error) {
}
c.Transport = conn
case "ws", "wss":
wsc, err := websocket.NewConfig(
fmt.Sprintf("%s://%s:%s%s", u.Scheme, u.Hostname(), u.Port(), u.EscapedPath()), "ws://")
wsc, err := websocket.NewConfig(u.String(), fmt.Sprintf("https://%s", u.Host))
if err != nil {
return nil, err
}
@@ -125,6 +124,7 @@ func (d *DialOptions) dial(urlStr string) (*BaseClient, error) {
if err != nil {
return nil, err
}
ws.PayloadType = websocket.BinaryFrame
c.Transport = ws
default:
return nil, ErrUnsupportedProtocol

0 comments on commit dc79848

Please sign in to comment.