2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-19 14:37:21 +00:00

python: idl: Resend requested but not acked conditions when reconnecting.

When reconnecting forget about in-flight monitor condition changes
if the user requested a newer condition already.

This matches the C implementation, in ovsdb_cs_db_sync_condition().

Fixes: 46d44cf3be ("python: idl: Add monitor_cond_since support.")
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Acked-By: Terry Wilson <twilson@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Dumitru Ceara
2022-01-11 17:37:41 +01:00
committed by Ilya Maximets
parent 9632f5551f
commit 718dc8fca7

View File

@@ -132,8 +132,10 @@ class ConditionState(object):
def reset(self):
"""Reset a requested condition change back to new"""
if self._req_cond is not None and self._new_cond is None:
self._new_cond, self._req_cond = (self._req_cond, None)
if self._req_cond is not None:
if self._new_cond is None:
self._new_cond = self._req_cond
self._req_cond = None
class Idl(object):