diff --git a/websocket/hybi.go b/websocket/hybi.go index dda743466..5f7c1c621 100644 --- a/websocket/hybi.go +++ b/websocket/hybi.go @@ -19,6 +19,7 @@ import ( "net/http" "net/url" "strings" + "strconv" ) const ( @@ -441,6 +442,7 @@ func hybiClientHandshake(config *Config, br *bufio.Reader, bw *bufio.Writer) (er return err } if resp.StatusCode != 101 { + ErrBadStatus.ErrorString = "bad status: " + strconv.Itoa(resp.StatusCode) return ErrBadStatus } if strings.ToLower(resp.Header.Get("Upgrade")) != "websocket" ||