This fixes a problem that app_mgr.close() is not called when
KeyboardInterrupt exception occurs.

Signed-off-by: OHMURA Kei <[email protected]>
---
 bin/ryu-manager |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/bin/ryu-manager b/bin/ryu-manager
index 03b1b79..c371454 100755
--- a/bin/ryu-manager
+++ b/bin/ryu-manager
@@ -76,8 +76,10 @@ def main():
         thr = gevent.spawn_later(0, webapp)
         services.append(thr)
 
-    gevent.joinall(services)
-    app_mgr.close()
+    try:
+        gevent.joinall(services)
+    finally:
+        app_mgr.close()
 
 
 if __name__ == "__main__":
-- 
1.7.9.5


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to