From 3d4f41381162848c27b74c9284857b15869346b2 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 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/paho/mqtt/client.py b/src/paho/mqtt/client.py index 99bfa671..e1e07527 100644 --- a/src/paho/mqtt/client.py +++ b/src/paho/mqtt/client.py @@ -763,7 +763,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 @@ -789,20 +789,16 @@ 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): try: return self._sock.recv(bufsize)