Skip to content
Snippets Groups Projects
Commit ad04b35b authored by Matthias Stefan Bodenbenner's avatar Matthias Stefan Bodenbenner
Browse files

2.6.1 - bug fix

parent 08786262
No related branches found
No related tags found
No related merge requests found
Pipeline #346031 passed
# WZL-MQTT
Current stable version: 2.5.4
Current stable version: 2.6.1
## Documentation
For the full API documentation, view [https://iot.wzl-mq.rwth-aachen.de/documentation/libs/mqtt/](https://iot.wzl-mq.rwth-aachen.de/documentation/libs/mqtt/).
......@@ -79,6 +78,13 @@ while True:
## Changelog
**2.6.1** - 2024-01-11
- decoupled name of the client used locally from the name used when connecting to the broker to ensure independent clients using this library can use the same names locally
**2.6.0** - 2024-01-10
- added the classmethod "client_names()" to client to retrieve the name of all instances
- the classmethod "get(username)" of the client raises the "ChildNotFoundError" if there is no instance having the specified username
**2.5.4** - 2023-04-18
- fixed usage of a randomized client_id, so that the same credentials can be used for multiple clients in parallel
......
# WZL-MQTT
Current stable version: 2.6.0
Current stable version: 2.6.1
## Documentation
......@@ -90,6 +90,9 @@ the European Union’s Horizon 2020 research and innovation programme and the EM
## Changelog
**2.6.1** - 2024-01-11
- decoupled name of the client used locally from the name used when connecting to the broker to ensure independent clients using this library can use the same names locally
**2.6.0** - 2024-01-10
- added the classmethod "client_names()" to client to retrieve the name of all instances
- the classmethod "get(username)" of the client raises the "ChildNotFoundError" if there is no instance having the specified username
......
......@@ -4,7 +4,7 @@ with open("PyPI-README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(name='wzl-mqtt',
version='2.6.0',
version='2.6.1',
url='https://git-ce.rwth-aachen.de/wzl-mq-public/iot/mqtt/',
project_urls={
"Bug Tracker": "https://git-ce.rwth-aachen.de/wzl-mq-public/iot/mqtt/-/issues",
......
......@@ -44,6 +44,7 @@ class MQTTClient:
'MQTTClient') if logger is not None else Logger().get('MQTTClient')
self.name = username if username is not None else str(uuid.uuid4())
parentname = f'{username}-{str(uuid.uuid4())}' if username is not None else str(uuid.uuid4())
if self.name in MQTTClient.instances:
self._logger.error(
......@@ -52,7 +53,7 @@ class MQTTClient:
MQTTClient.instances[self.name] = self
self.prefix = prefix
self._client = mqtt.Client(self.name, *args, **kwargs)
self._client = mqtt.Client(parentname, *args, **kwargs)
self._client.on_connect = self._on_connect
self._client.on_disconnect = self._on_disconnect
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment