From 399618df923ce1768e7fcdd8505a6e881d67ae40 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 26 Jun 2018 08:52:59 -0400 Subject: [PATCH] Attempt to logout on the way out when broken Do a no-retry logout attempt, in hopes of mitigating leaving stray sessions open in various situations. Change-Id: I750249a69cac2695d8da45780c3b908943148565 --- pyghmi/ipmi/private/session.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py index 2988e570..073c3016 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -537,6 +537,7 @@ class Session(object): Session.keepalive_sessions.pop(self, None) with util.protect(WAITING_SESSIONS): Session.waiting_sessions.pop(self, None) + self.logout() self.logging = False self.errormsg = error if self.logged: