1 Description: greenio: send() was running empty loop on ENOTCONN
3 https://github.com/eventlet/eventlet/issues/192
4 Author: Sergey Shepelev <temotor@gmail.com>
5 Date: Fri, 15 May 2015 03:56:04 +0300
7 diff --git a/AUTHORS b/AUTHORS
8 index e0ab0e2..c57f010 100644
11 @@ -119,3 +119,4 @@ Thanks To
12 * Sean Dague, wsgi: Provide python logging compatibility
13 * Tim Simmons, Use _socket_nodns and select in dnspython support
14 * Antonio Cuni, fix fd double close on PyPy
16 diff --git a/eventlet/greenio/base.py b/eventlet/greenio/base.py
17 index 8da51ca..1e43176 100644
18 --- a/eventlet/greenio/base.py
19 +++ b/eventlet/greenio/base.py
20 @@ -358,7 +358,8 @@ def send(self, data, flags=0):
22 total_sent += fd.send(data[total_sent:], flags)
23 except socket.error as e:
24 - if get_errno(e) not in SOCKET_BLOCKING:
26 + if eno == errno.ENOTCONN or eno not in SOCKET_BLOCKING:
29 if total_sent == len_data: