2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

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

This commit is contained in:
Mukund Sivaraman
2012-12-05 13:26:29 +05:30
parent 71cf0a22ba
commit 609e5bf400

View File

@@ -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):