diff --git a/eventlet/greenio.py b/eventlet/greenio.py index b8de16f..da26dc6 100644 --- a/eventlet/greenio.py +++ b/eventlet/greenio.py @@ -282,11 +282,6 @@ class GreenSocket(object): if self.act_non_blocking: return fd.send(data, flags) - # XXX: need to deal with the exceptions that could be raised if the - # buffer is full (specifically the try/except below) - - # need to test all of the conditions - # blocking socket behavior - sends all, blocks if the buffer is full total_sent = 0 len_data = len(data) diff --git a/tests/greenio_test.py b/tests/greenio_test.py index 7f5354c..f71e40c 100644 --- a/tests/greenio_test.py +++ b/tests/greenio_test.py @@ -160,7 +160,6 @@ class TestGreenIo(LimitedTestCase): def server(): # accept the connection in another greenlet sock, addr = listener.accept() - bufsized(sock, 1) eventlet.sleep(.5) @@ -172,14 +171,14 @@ class TestGreenIo(LimitedTestCase): client.settimeout(0.1) client.connect(addr) - bufsized(client, 1) try: - msg = "A"*min_buf_size() + msg = "A"*8192*1024 + total_sent = 0 # want to exceed the size of the OS buffer so it'll block for x in range(10): - client.send(msg) + total_sent += client.send(msg) self.fail("socket.timeout not raised") except socket.timeout, e: self.assert_(hasattr(e, 'args'))