Fix bug connecting to secure msgbus (websocket) endpoints

This commit is contained in:
James Mills 2018-04-30 23:08:44 -07:00
bovenliggende 7402386c08
commit 95e5e36662
Geen bekende sleutel gevonden voor deze handtekening in de database
GPG sleutel-ID: AC4C014F1440EBD6

Bestand weergeven

@ -224,7 +224,12 @@ func (s *Subscriber) Run() {
log.Fatal("invalid url: %s", s.client.url)
}
u.Scheme = "ws"
if strings.HasPrefix(s.client.url, "https") {
u.Scheme = "wss"
} else {
u.Scheme = "ws"
}
u.Path += fmt.Sprintf("/%s", s.topic)
url := u.String()