Skip to content

Commit

Permalink
Moments don't send empty bundles (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
josiah-wolf-oberholtzer authored May 10, 2023
1 parent 32dd3b8 commit 9b3818c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion supriya/contexts/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ def __exit__(self, *args) -> None:
timestamp = (
self.seconds + self.context._latency if self.seconds is not None else None
)
if len(requests) > 1 or timestamp is not None:
if len(requests) and timestamp is not None:
self.context.send(RequestBundle(timestamp=timestamp, contents=requests))
elif len(requests) > 1:
self.context.send(RequestBundle(contents=requests))
elif len(requests):
self.context.send(requests[0])
self.closed = True
Expand Down

0 comments on commit 9b3818c

Please sign in to comment.