Skip to content

Commit

Permalink
Don't panic when Dial() fails with error
Browse files Browse the repository at this point in the history
fixes #338
  • Loading branch information
Al S-M committed Aug 29, 2019
1 parent 93c8a06 commit 8f8de00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion websocket.go
Expand Up @@ -27,7 +27,7 @@ func NewWebsocket(host string, tlsc *tls.Config, timeout time.Duration, requestH
ws, _, err := dialer.Dial(host, requestHeader)

if err != nil {
panic(err)
return nil, err
}

wrapper := &websocketConnector{
Expand Down

0 comments on commit 8f8de00

Please sign in to comment.