From 41355d038a8fcad67000b2898e39c1d0c9edf836 Mon Sep 17 00:00:00 2001 From: Pierre Fersing Date: Wed, 10 Jan 2024 20:48:55 +0100 Subject: [PATCH] Fix review comments --- src/paho/mqtt/client.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/paho/mqtt/client.py b/src/paho/mqtt/client.py index 76c601d7..f3c88b61 100644 --- a/src/paho/mqtt/client.py +++ b/src/paho/mqtt/client.py @@ -881,7 +881,7 @@ def max_inflight_messages(self, value: int) -> None: @property def max_queued_messages(self) -> int: - "Maximum number of message with QoS > 0 that can be part way through their network flow at once" + """Maximum number of message in the outgoing message queue, 0 means unlimited""" return self._max_queued_messages @max_queued_messages.setter @@ -907,17 +907,14 @@ def will_topic(self) -> str | None: @property def will_payload(self) -> bytes | None: """The payload for the will message that is sent when disconnecting unexpectedly. None if a will shall not be sent.""" - if self._will_topic is None: - return None - - return self._will_topic.decode("utf-8") + return self._will_payload @property def logger(self) -> logging.Logger | None: return self._logger @logger.setter - def logger(self, value: logging.Logger) -> None: + def logger(self, value: logging.Logger | None) -> None: self._logger = value def _sock_recv(self, bufsize: int) -> bytes: