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 Dec 12, 2022
1 parent ac8313c commit eb3d0a8
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 @@ -277,7 +277,6 @@ async def aclose(self):
@asynccontextmanager
async def subscribe(
self,

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

if not self._result:
while True:
Expand Down

0 comments on commit eb3d0a8

Please sign in to comment.