mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
fix: getattr-guard _stop_loop_liveness_guards in GatewayRunner.stop
Teardown-path tests build bare runners via object.__new__ without the liveness-guard machinery; the unguarded call raised AttributeError in 8 tests. Same guard pattern as the start path.
This commit is contained in:
parent
9cd7296849
commit
86084d03ba
1 changed files with 5 additions and 1 deletions
|
|
@ -9431,7 +9431,11 @@ class GatewayRunner(GatewayAuthorizationMixin, GatewayKanbanWatchersMixin, Gatew
|
|||
service_restart: bool = False,
|
||||
) -> None:
|
||||
"""Stop the gateway and disconnect all adapters."""
|
||||
self._stop_loop_liveness_guards()
|
||||
# getattr-guard: shutdown-path tests build bare runners via
|
||||
# object.__new__ that lack the liveness-guard machinery.
|
||||
_stop_guards = getattr(self, "_stop_loop_liveness_guards", None)
|
||||
if callable(_stop_guards):
|
||||
_stop_guards()
|
||||
if restart:
|
||||
self._restart_requested = True
|
||||
self._restart_detached = detached_restart
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue