mirror of
https://opendev.org/x/pyghmi
synced 2026-08-28 17:46:44 +00:00
Fix keepalive behavior on broken Sessions
If a Session object is broken (e.g. BMC goes away or network outage), then its keepalive timer would cause an application to be starved of being able to do any IPMI related work. Address this scenario by having the instance deregister its keepalive at the point it reports itself as broken. Change-Id: I6b7af8ad03759c676110fb4f0b7bfa41642152f3
This commit is contained in:
@@ -1151,6 +1151,9 @@ class Session(object):
|
||||
self.ipmicallback(response)
|
||||
self.incommand = False
|
||||
self.nowait = False
|
||||
# since our connection has failed retries
|
||||
# deregister our keepalive facility
|
||||
Session.keepalive_sessions.pop(self, None)
|
||||
return
|
||||
elif self.sessioncontext == 'FAILED':
|
||||
self.nowait = False
|
||||
|
||||
Reference in New Issue
Block a user