Sure I'll send a separate patch. Ethan
On Fri, Apr 13, 2012 at 16:40, Ben Pfaff <b...@nicira.com> wrote: > In that case then can you make the corresponding change in > lib/reconnect.c also? > > On Fri, Apr 13, 2012 at 03:57:20PM -0700, Ethan Jackson wrote: >> Yes it appears to fix the problem according to the unit tests. It >> seems correct to fix it in both places to me though. >> >> Ethan >> >> On Fri, Apr 13, 2012 at 15:53, Ben Pfaff <b...@nicira.com> wrote: >> > On Wed, Apr 11, 2012 at 10:02:09PM -0700, Ethan Jackson wrote: >> >> The python reconnect library attempted to send a probe every 0 >> >> milliseconds instead of disabling probing when the probe_interval >> >> was zero. >> >> >> >> Signed-off-by: Ethan Jackson <et...@nicira.com> >> > >> > I think that this changes the Idle state so that, if there is no >> > probe interval, the deadline never expires. That doesn't make sense >> > to me, because if we've got no probe interval then we should never >> > enter the Idle state: >> >> @@ -112,7 +112,9 @@ class Reconnect(object): >> >> >> >> @staticmethod >> >> def deadline(fsm): >> >> - return fsm.state_entered + fsm.probe_interval >> >> + if fsm.probe_interval: >> >> + return fsm.state_entered + fsm.probe_interval >> >> + return None >> >> >> >> @staticmethod >> >> def run(fsm, now): >> > >> > But this looks like the real fix, to prevent the Idle state from ever >> > being entered if there is no probe interval (because Active.deadline() >> > returns None in this case): >> >> @@ -504,7 +506,9 @@ class Reconnect(object): >> >> connection is indeed in working order. (This will only be >> >> returned if the "probe interval" is nonzero--see >> >> self.set_probe_interval()).""" >> >> - if now >= self.state.deadline(self): >> >> + >> >> + deadline = self.state.deadline(self) >> >> + if deadline is not None and now >= deadline: >> >> return self.state.run(self, now) >> >> else: >> >> return None >> > >> > So, if you just make the second change, does it still fix the problem? >> > >> > Thanks, >> > >> > Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev