From 7ab1aef5e5180f96909a72fbe3d577fbdc56babf Mon Sep 17 00:00:00 2001
From: "Victor J. Orlikowski" <vjo@duke.edu>
Date: Tue, 19 Apr 2016 19:28:03 -0400
Subject: [PATCH] Eventlet throws a subclass of IOError when an SSL read
 timeout occurs. Ensure that the read loop continues in this case.

Signed-off-by: Victor J. Orlikowski <vjo@duke.edu>
---
 ryu/controller/controller.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py
index 08304d2..1ae7287 100644
--- a/ryu/controller/controller.py
+++ b/ryu/controller/controller.py
@@ -194,6 +194,10 @@ class Datapath(ofproto_protocol.ProtocolDesc):
                 ret = self.socket.recv(required_len)
             except SocketTimeout:
                 continue
+            except ssl.SSLError:
+                # eventlet throws SSLError (which is a subclass of IOError)
+                # on SSL socket read timeout; re-try the loop in this case.
+                continue
             except (EOFError, IOError):
                 break
 
-- 
2.5.4 (Apple Git-61)

