Merge pull request #7 from gwinn/master

update ws url generation
This commit is contained in:
Alex Lushpai 2018-09-03 15:57:42 +03:00 committed by GitHub
commit 5268b49661
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -669,7 +669,7 @@ func (c *MgClient) WsMeta(events []string) (string, http.Header, error) {
return url, nil, err 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 == "" { if url == "" {
err := errors.New("empty WS URL") err := errors.New("empty WS URL")