Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreF committed Jan 10, 2024
1 parent 524df4a commit 3d4f413
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/paho/mqtt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 3d4f413

Please sign in to comment.