From 7a7012b6b3d3aeabd9134bb45d7efc1e4f88c48c Mon Sep 17 00:00:00 2001 From: Sigmund Augdal Date: Fri, 4 Mar 2016 11:34:27 +0100 Subject: [PATCH] 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. --- cassandra/io/eventletreactor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cassandra/io/eventletreactor.py b/cassandra/io/eventletreactor.py index 8fda42fb4e..dfaea8bfb4 100644 --- a/cassandra/io/eventletreactor.py +++ b/cassandra/io/eventletreactor.py @@ -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) )