Commit 609e5bf4 authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2353] Explain why we throw after 15 recv()s, in a comment

parent 71cf0a22
......@@ -1893,6 +1893,8 @@ class TestBossComponents(unittest.TestCase):
raise Exception('bufsize != 1')
if flags != socket.MSG_DONTWAIT:
raise Exception('flags != socket.MSG_DONTWAIT')
# after 15 recv()s, throw a socket.error with EAGAIN to
# get _socket_data() to save back what's been read.
if self.throw and self.i > 15:
raise socket.error(errno.EAGAIN, 'Try again')
if self.i >= len(self.buf):
Supports Markdown
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