2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-15 20:27:45 +00:00

Break session objects on keepalive failures

If the keepalive fails, it was causing the library to spin
on expired keepalive attempts.  Call mark_broken in order to
avoid that spinning.

Change-Id: I1c7a06ebf7609989ebd6e90d26ac69f3fe7b8699
This commit is contained in:
Jarrod Johnson 2014-05-02 13:36:06 -04:00
parent 784b39d06e
commit 2115ed5c3b

View File

@ -934,7 +934,10 @@ class Session(object):
"""
if self.incommand: # if currently in command, no cause to keepalive
return
self.raw_command(netfn=6, command=1)
try:
self.raw_command(netfn=6, command=1)
except exc.IpmiException:
self._mark_broken()
@classmethod
def _route_ipmiresponse(cls, sockaddr, data):