[issue5661] asyncore should catch EPIPE while sending() and receiving()

Xavier de Gaye report at bugs.python.org
Sat Oct 29 14:27:21 CEST 2011


Xavier de Gaye <xdegaye at gmail.com> added the comment:

The test fails when use_poll is True.
The difference between using poll() and poll2():

    poll: All the read events are processed before the write events,
    so the close after the first recv by TestHandler will be followed
    by a send by TestClient within the same call to poll(). The
    test is deterministic.

    poll2: The order in which events are received is os dependent. So
    it is possible that the first recv by TestHandler is the last
    event in the 'r' list, so that after the close, a new call to
    poll2() is done and the first event in this new 'r' list, is not
    the expected write event for TestClient.

What about forcing self.use_poll to False, before calling
loop_waiting_for_flag() ? The drawback being that the test will be run
twice with the same environment.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5661>
_______________________________________


More information about the Python-bugs-list mailing list