Skip to content

Commit

Permalink
Break loop after result retreival
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Jan 30, 2023
1 parent a71a958 commit 33b0e36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tractor/_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ async def aclose(self):
@asynccontextmanager
async def subscribe(
self,

) -> AsyncIterator[BroadcastReceiver]:
'''
Allocate and return a ``BroadcastReceiver`` which delegates
Expand Down Expand Up @@ -705,6 +704,7 @@ def consume(
result = consume(msg)
if result:
self._result = result
break

if not self._result:
while True:
Expand Down

0 comments on commit 33b0e36

Please sign in to comment.