From: Sumit Garg Date: Thu, 25 Jun 2015 13:24:54 +0000 (-0400) Subject: python: Fix issue with probes for JSONRPC connections X-Git-Tag: v2.4.0~69 X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=db7474614d835dddc9c72c8d527a9f7f751cbb7d python: Fix issue with probes for JSONRPC connections When opening a JSONRPC connection, the health probes are incorrectly getting turned off for connections that need probes. In other words, when stream_or_pstream_needs_probes() return non-zero, the probes are gettting disabled as the probe interval is getting set to zero. This leads to incorrect behavior such that probes are: - not getting turned off for unix: connections - getting turned off for tcp:/ssl: connections The changes in this commit fix this issue. Signed-off-by: Sumit Garg Signed-off-by: Ben Pfaff --- diff --git a/python/ovs/jsonrpc.py b/python/ovs/jsonrpc.py index 6e7a2cc06..d54d74b41 100644 --- a/python/ovs/jsonrpc.py +++ b/python/ovs/jsonrpc.py @@ -378,7 +378,7 @@ class Session(object): if ovs.stream.PassiveStream.is_valid_name(name): reconnect.set_passive(True, ovs.timeval.msec()) - if ovs.stream.stream_or_pstream_needs_probes(name): + if not ovs.stream.stream_or_pstream_needs_probes(name): reconnect.set_probe_interval(0) return Session(reconnect, None)