Fix EventletConnection without ssl on recent versions of eventlet

It seems recent versions of eventlet (tested on 0.18.4) has changed
which exception is raised on timeout during recv(). This was not
handled properly by PR #485 which caused a regression.
This commit is contained in:
Sigmund Augdal
2016-03-04 11:34:27 +01:00
parent f6d5558f1f
commit 7a7012b6b3

View File

@@ -38,7 +38,8 @@ def is_timeout(err):
return (
err in (EINPROGRESS, EALREADY, EWOULDBLOCK) or
(err == EINVAL and os.name in ('nt', 'ce')) or
(isinstance(err, ssl.SSLError) and err.args[0] == 'timed out')
(isinstance(err, ssl.SSLError) and err.args[0] == 'timed out') or
isinstance(err, socket.timeout)
)