If the client closes the connection during setup, the socket's FD is
closed out automatically, ignore the errors while forcably shuting down
the socket.

Signed-off-by: Jason Kölker <[email protected]>
---
 ryu/services/protocols/ovsdb/manager.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ryu/services/protocols/ovsdb/manager.py 
b/ryu/services/protocols/ovsdb/manager.py
index e12935b..e406c44 100644
--- a/ryu/services/protocols/ovsdb/manager.py
+++ b/ryu/services/protocols/ovsdb/manager.py
@@ -92,7 +92,11 @@ class OVSDB(app_manager.RyuApp):
             self.send_event_to_observers(ev)
 
         else:
-            sock.shutdown(socket.SHUT_RDWR)
+            try:
+                sock.shutdown(socket.SHUT_RDWR)
+            except:
+                pass
+
             sock.close()
 
     def start(self):
-- 
2.5.0


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to