Commit 13f09271 authored by Denis Bilenko's avatar Denis Bilenko

Merge pull request #420 from fantix/socket_send

fix _socket3 send/sendall
parents dd798290 8534dced
......@@ -3,7 +3,6 @@
import io
import time
from gevent import _socketcommon
from gevent.hub import text_type
import _socket
from io import BlockingIOError
......@@ -288,15 +287,13 @@ class socket(_socket.socket):
raise
self._wait(self._write_event)
try:
return sock.send(data, flags)
return _socket.socket.send(self, data, flags)
except error as ex2:
if ex2.args[0] == EWOULDBLOCK:
return 0
raise
def sendall(self, data, flags=0):
if isinstance(data, text_type):
data = data.encode()
if self.timeout is None:
data_sent = 0
while data_sent < len(data):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment