diff --git a/src/keria/app/agenting.py b/src/keria/app/agenting.py index cfd0e18a..8566d2d1 100644 --- a/src/keria/app/agenting.py +++ b/src/keria/app/agenting.py @@ -233,6 +233,10 @@ def delete(self, agent): del self.agents[agent.caid] def close(self, agent): + logger.info(f"closing idle agent {agent.caid}") + self.remove(agent.doers) + self.remove([agent]) + del self.agents[agent.caid] agent.hby.ks.close(clear=False) agent.seeker.close(clear=False) agent.exnseeker.close(clear=False) @@ -242,9 +246,7 @@ def close(self, agent): agent.registrar.rgy.close() agent.mgr.rb.close(clear=False) agent.hby.close(clear=False) - self.remove(agent.doers) - self.remove([agent]) - del self.agents[agent.caid] + def get(self, caid): if caid in self.agents: