cache: use secure websockets for HTTPS Plex addresses

This commit is contained in:
John Clayton 2018-05-21 09:40:16 -06:00 committed by Nick Craig-Wood
parent e5ff375948
commit 71b4f1ccab

View File

@ -108,7 +108,7 @@ func (p *plexConnector) closeWebsocket() {
func (p *plexConnector) listenWebsocket() {
u := strings.Replace(p.url.String(), "http://", "ws://", 1)
u = strings.Replace(u, "https://", "ws://", 1)
u = strings.Replace(u, "https://", "wss://", 1)
conn, err := websocket.Dial(fmt.Sprintf(defPlexNotificationURL, strings.TrimRight(u, "/"), p.token),
"", "http://localhost")
if err != nil {