Skip to content

Commit 8b6b9c3

Browse files
committed
set WebSockets path (#70)
1 parent 13d197d commit 8b6b9c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pywis_pubsub/mqtt.py

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ def __init__(self, broker: str, options: dict = {}) -> None:
7070

7171
self.conn.enable_logger(logger=LOGGER)
7272

73+
if self.broker_url.scheme in ['ws', 'wss']:
74+
LOGGER.debug('Setting Websockets path: {self.broker_url.path}')
75+
self.conn.ws_set_options(self.broker_url.path)
76+
7377
if None not in [self.broker_url.username, self.broker_url.password]:
7478
LOGGER.debug('Setting credentials')
7579
self.conn.username_pw_set(

0 commit comments

Comments
 (0)