diff options
-rw-r--r-- | ryu/lib/ofctl_v1_0.py | 5 | ||||
-rw-r--r-- | ryu/lib/ofctl_v1_2.py | 5 | ||||
-rw-r--r-- | ryu/lib/ofctl_v1_3.py | 5 |
3 files changed, 6 insertions, 9 deletions
diff --git a/ryu/lib/ofctl_v1_0.py b/ryu/lib/ofctl_v1_0.py index 96f28361..015f36a9 100644 --- a/ryu/lib/ofctl_v1_0.py +++ b/ryu/lib/ofctl_v1_0.py @@ -201,9 +201,8 @@ def send_stats_request(dp, stats, waiters, msgs): waiters_per_dp[stats.xid] = (lock, msgs) dp.send_msg(stats) - try: - lock.wait(timeout=DEFAULT_TIMEOUT) - except hub.Timeout: + lock.wait(timeout=DEFAULT_TIMEOUT) + if not lock.is_set(): del waiters_per_dp[stats.xid] diff --git a/ryu/lib/ofctl_v1_2.py b/ryu/lib/ofctl_v1_2.py index 8ca798ad..48d59974 100644 --- a/ryu/lib/ofctl_v1_2.py +++ b/ryu/lib/ofctl_v1_2.py @@ -543,9 +543,8 @@ def send_stats_request(dp, stats, waiters, msgs): waiters_per_dp[stats.xid] = (lock, msgs) dp.send_msg(stats) - try: - lock.wait(timeout=DEFAULT_TIMEOUT) - except hub.Timeout: + lock.wait(timeout=DEFAULT_TIMEOUT) + if not lock.is_set(): del waiters_per_dp[stats.xid] diff --git a/ryu/lib/ofctl_v1_3.py b/ryu/lib/ofctl_v1_3.py index 83bfce91..b7a69ee0 100644 --- a/ryu/lib/ofctl_v1_3.py +++ b/ryu/lib/ofctl_v1_3.py @@ -571,9 +571,8 @@ def send_stats_request(dp, stats, waiters, msgs): waiters_per_dp[stats.xid] = (lock, msgs) dp.send_msg(stats) - try: - lock.wait(timeout=DEFAULT_TIMEOUT) - except hub.Timeout: + lock.wait(timeout=DEFAULT_TIMEOUT) + if not lock.is_set(): del waiters_per_dp[stats.xid] |