diff --git a/pyghmi/ipmi/private/session.py b/pyghmi/ipmi/private/session.py index 54c326fc..6520cce6 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -560,7 +560,7 @@ class Session(object): self.kgo)] except KeyError: pass - self.logout() + self.logout(False) self.logging = False self.errormsg = error if not self.broken: @@ -1770,13 +1770,14 @@ class Session(object): self.expiration = self.timeout + _monotonic_time() Session.waiting_sessions[self]['timeout'] = self.expiration - def logout(self): + def logout(self, sessionok=True): if not self.logged: return {'success': True} if self.cleaningup: self.nowait = True if self.sol_handler: - self.raw_command(netfn=6, command=0x49, data=(1, 1, 0, 0, 0, 0)) + self.raw_command(netfn=6, command=0x49, data=(1, 1, 0, 0, 0, 0), + retry=sessionok) self.raw_command(command=0x3c, netfn=6, data=struct.unpack("4B",