From 0e64fa5bd23a64f83e34f5f00cf08798fd334d56 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 8 May 2014 13:51:24 -0400 Subject: [PATCH] Remove references to custom keepalives on logout Since they will not be used on a dead session, remove the reference to mitigate risk of dead references keeping python from recovering used memory. Change-Id: Ib33ea32c02d3cc89b0aa62532e51fc1351e26a79 --- pyghmi/ipmi/private/session.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py index 92543fec..62300739 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -379,6 +379,7 @@ class Session(object): Session.keepalive_sessions.pop(self, None) if self.logged: self.logged = 0 # mark session as busted + self._customkeepalives = None if not self.broken: self.socketpool[self.socket] -= 1 self.broken = True @@ -1410,6 +1411,7 @@ class Session(object): # stop trying for a keepalive, Session.keepalive_sessions.pop(self, None) self.logged = 0 + self._customkeepalives = None self.nowait = False self.socketpool[self.socket] -= 1 return {'success': True}