Skip to content

Commit

Permalink
fix for publish when shutting down
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Jul 4, 2024
1 parent 55e54af commit c8ba5f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/textual/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ async def _on_idle(self, event: events.Idle) -> None:
finally:
if self._bindings_updated:
self._bindings_updated = False
self.app.call_later(self.bindings_updated_signal.publish, self)
self.bindings_updated_signal.publish(self)

def _compositor_refresh(self) -> None:
"""Perform a compositor refresh."""
Expand Down
2 changes: 1 addition & 1 deletion src/textual/signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def publish(self, data: SignalT) -> None:
"""
# Don't publish if the DOM is not ready or shutting down
if not self._owner.is_attached:
if not self._owner.is_attached or not self._owner.app._exit:
return
for ancestor_node in self._owner.ancestors_with_self:
if not ancestor_node.is_running:
Expand Down

0 comments on commit c8ba5f4

Please sign in to comment.