From dc906b9cd008451525bccee1ea4ccb469a936323 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Mon, 13 Jul 2026 16:18:15 +0200 Subject: [PATCH] Await IPMI session challenge callbacks The IPMI 1.5 session-challenge callback returned coroutine objects from error reporting and session activation instead of expressing an asynchronous callback contract directly. That made completion depend on the dispatch path noticing and awaiting the returned object. Make the callback asynchronous and explicitly await both onlogon() and _activate_session(), ensuring failure notification and activation finish before callback dispatch continues. --- confluent_server/aiohmi/ipmi/private/session.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/confluent_server/aiohmi/ipmi/private/session.py b/confluent_server/aiohmi/ipmi/private/session.py index c6891184..b39fe33e 100644 --- a/confluent_server/aiohmi/ipmi/private/session.py +++ b/confluent_server/aiohmi/ipmi/private/session.py @@ -1043,15 +1043,16 @@ class Session(object): elif self.ipmiversion == 2.0: await self._open_rmcpplus_request() - def _got_session_challenge(self, response): + async def _got_session_challenge(self, response): errstr = get_ipmi_error(response, suffix=" while getting session challenge") if errstr: - return self.onlogon({'error': errstr}) + await self.onlogon({'error': errstr}) + return data = response['data'] self.sessionid = struct.unpack("