From abd1039801b1fc0b2754b0fbc8097670f11678d9 Mon Sep 17 00:00:00 2001 From: OHMURA Kei Date: Thu, 24 Jan 2013 10:56:19 +0900 Subject: [PATCH] ofctl_v1_0: fix stats timeout handling This patch fixes a issue reported by https://github.com/osrg/ryu/issues/7 Signed-off-by: OHMURA Kei Signed-off-by: FUJITA Tomonori --- ryu/lib/ofctl_v1_0.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ryu/lib/ofctl_v1_0.py b/ryu/lib/ofctl_v1_0.py index 8553c9a2..1184b9b5 100644 --- a/ryu/lib/ofctl_v1_0.py +++ b/ryu/lib/ofctl_v1_0.py @@ -172,15 +172,15 @@ def match_to_str(m): def send_stats_request(dp, stats, waiters, msgs): dp.set_xid(stats) - waiters = waiters.setdefault(dp.id, {}) + waiters_per_dp = waiters.setdefault(dp.id, {}) lock = gevent.event.AsyncResult() - waiters[stats.xid] = (lock, msgs) + waiters_per_dp[stats.xid] = (lock, msgs) dp.send_msg(stats) try: lock.get(timeout=DEFAULT_TIMEOUT) except gevent.Timeout: - del waiters[dp.id][stats.xid] + del waiters_per_dp[stats.xid] def get_desc_stats(dp, waiters):