Ticket #5377 defect new
twisted.internet.udp.Port is disconnected by _PollLikeMixin reactors when it gets connection refused
|Reported by:||zseil||Owned by:|
Description (last modified by itamar) (diff)
SelectReactor calls selectable.doRead() even when the selectable gets disconnected, which allows udp.Port.doRead() to call protocol.connectionRefused(). In constrast, PollReactor and other call selectable.connectionLost() directly in case of bare _POLL_DISCONNECTED event. See the attached test which hangs on Poll, Epoll and Gtk2 reactors but passes on Select reactor on Linux (Ubuntu Lucid).
Possibly the test is wrong, maybe udp.Port.doRead() should stop listening if recvfrom fails with ECONNREFUSED or ECONNRESET instead of calling protocol.connectionRefused().