From 80d712b44d36e6e6169a4a566a51896e1951d530 Mon Sep 17 00:00:00 2001 From: Alex Lushpai Date: Mon, 3 Sep 2018 15:40:24 +0300 Subject: [PATCH] update ws url generation --- v1/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1/client.go b/v1/client.go index c3501e5..ee338e6 100644 --- a/v1/client.go +++ b/v1/client.go @@ -669,7 +669,7 @@ func (c *MgClient) WsMeta(events []string) (string, http.Header, error) { return url, nil, err } - url = fmt.Sprintf("%s%s%s%s", c.URL, prefix, "/ws?events=", strings.Join(events[:], ",")) + url = fmt.Sprintf("%s%s%s%s", strings.Replace(c.URL, "https", "ws", 1), prefix, "/ws?events=", strings.Join(events[:], ",")) if url == "" { err := errors.New("empty WS URL")