Skip to content

Commit d806c24

Browse files
authored
set WebSockets path (#70) (#73)
1 parent 989c553 commit d806c24

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
@@ -71,6 +71,10 @@ def __init__(self, broker: str, options: dict = {}) -> None:
7171

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

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

0 commit comments

Comments
 (0)