mirror of
https://opendev.org/x/pyghmi
synced 2025-01-16 04:38:19 +00:00
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
This commit is contained in:
parent
af815eee55
commit
0e64fa5bd2
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user