2
0
mirror of https://opendev.org/x/pyghmi synced 2026-03-29 06:13:30 +00:00

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
This commit is contained in:
Jarrod Johnson
2015-02-01 09:38:20 -05:00
parent d4a4689f0e
commit 13acb7e650

View File

@@ -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