greenio: send() was running empty loop on ENOTCONN; Thanks to Seyeong Kim

https://github.com/eventlet/eventlet/issues/192
This commit is contained in:
Sergey Shepelev
2015-05-15 03:56:04 +03:00
parent dc10af4702
commit ed06553330
2 changed files with 3 additions and 1 deletions

View File

@@ -119,3 +119,4 @@ Thanks To
* Sean Dague, wsgi: Provide python logging compatibility * Sean Dague, wsgi: Provide python logging compatibility
* Tim Simmons, Use _socket_nodns and select in dnspython support * Tim Simmons, Use _socket_nodns and select in dnspython support
* Antonio Cuni, fix fd double close on PyPy * Antonio Cuni, fix fd double close on PyPy
* Seyeong Kim

View File

@@ -358,7 +358,8 @@ class GreenSocket(object):
try: try:
total_sent += fd.send(data[total_sent:], flags) total_sent += fd.send(data[total_sent:], flags)
except socket.error as e: except socket.error as e:
if get_errno(e) not in SOCKET_BLOCKING: eno = get_errno(e)
if eno == errno.ENOTCONN or eno not in SOCKET_BLOCKING:
raise raise
if total_sent == len_data: if total_sent == len_data: