Skip to content

Commit

Permalink
Updating messages iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-summers committed Jul 1, 2024
1 parent f2647b2 commit e0fd984
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aiomqtt/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ def __init__( # noqa: C901, PLR0912, PLR0913, PLR0915
if max_queued_incoming_messages is None:
max_queued_incoming_messages = 0
self._queue = queue_type(maxsize=max_queued_incoming_messages)
self.messages = self._messages()

# Semaphore to limit the number of concurrent outgoing calls
self._outgoing_calls_sem: asyncio.Semaphore | None
Expand Down Expand Up @@ -321,6 +320,10 @@ def __init__( # noqa: C901, PLR0912, PLR0913, PLR0915
timeout = 10
self.timeout = timeout

@property
def messages(self) -> AsyncGenerator[Message, None]:
return self._messages()

@property
def identifier(self) -> str:
"""Return the client identifier.
Expand Down

0 comments on commit e0fd984

Please # to comment.