diff --git a/gotify_tray/gotify/listener.py b/gotify_tray/gotify/listener.py index 7fdf756..f18d1a5 100644 --- a/gotify_tray/gotify/listener.py +++ b/gotify_tray/gotify/listener.py @@ -25,7 +25,6 @@ class Listener(QtCore.QThread): qurl.setScheme("wss" if qurl.scheme() == "https" else "ws") qurl.setPath(qurl.path() + "stream") qurl.setQuery(f"token={client_token}") - self.qurl = qurl self.ws = websocket.WebSocketApp( qurl.toString(), @@ -80,10 +79,10 @@ class Listener(QtCore.QThread): def run(self): self.running = True try: - sslopt = None - if platform.system() == "Darwin" and self.qurl.scheme() == "wss": - sslopt = {"cert_reqs": ssl.CERT_NONE} - self.ws.run_forever(sslopt=sslopt) + if platform.system() == "Darwin": + self.ws.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE}) + else: + self.ws.run_forever() finally: logger.debug("Listener: stopped.") self.running = False diff --git a/requirements.txt b/requirements.txt index c67ae58..b991b75 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ requests==2.28.1 -websocket-client==1.4.1 +websocket-client==1.4.2 pyqt6==6.4.0 python-dateutil==2.8.2