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>
Tested-by: Andy Hill <hillad@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Victor J. Orlikowski 2016-04-19 19:28:03 -04:00 committed by FUJITA Tomonori
parent d1495523eb
commit f61bb5f938
1 changed files with 4 additions and 0 deletions

View File

@ -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