From 13acb7e650f55663ed4b93d605ef9e81aa5e51ff Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 1 Feb 2015 09:38:20 -0500 Subject: [PATCH] Correct delay_xmit behavior delay_xmit was broken due to deferral of the retry calculation. It relied upon the deadline set in the retry to govern the initial transmit of data. By trying to make it delay to a more realistic time by not starting the clock until the packet was transmitted, the delay_xmit which never transmitted was in bad shape. This was already broken since retry=False would have had the same effect, but that is a rare scenario. Fix by having delay_xmit specifically handle the assignment separate of retry logic. Change-Id: Ia251215f14f8a5808e8a8f5b3f53fbef40721709 --- 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 d8b77322..1cc9b441 100644 --- a/pyghmi/ipmi/private/session.py +++ b/pyghmi/ipmi/private/session.py @@ -1481,6 +1481,8 @@ class Session(object): # special, otherwise increment self.sequencenumber += 1 if delay_xmit is not None: + Session.waiting_sessions[self] = {} + Session.waiting_sessions[self]['ipmisession'] = self Session.waiting_sessions[self]['timeout'] = delay_xmit + \ _monotonic_time() return # skip transmit, let retry timer do it's thing