Author giampaolo.rodola
Recipients giampaolo.rodola
Date 2007-12-02.17:54:16
SpamBayes Score 0.0330135
Marked as misclassified No
Message-id <>
asyncore's module readwrite() function, used when invoking
asyncore.loop(use_poll=1), erroneously calls handle_read_event() when
receiving OOB (Out Of Band) data. handle_expt_event() should be called
The patch in attachment does that.

In addition I strongly think that POLLERR, POLLHUP and POLLNVAL events
handling is incorrect too.
As far as I read from here:
...they refers to the following events:

POLLERR 	An error has occurred (revents only).
POLLHUP 	Device has been disconnected ( revents only).
POLLNVAL	Invalid fd member (revents only).

They are actually associated to handle_expt_event() and this is
incorrect since it should be called only when receiving OOB data.

        if flags & (select.POLLERR | select.POLLHUP | select.POLLNVAL):

I'm not sure what should be called instead, if handle_read_event or
handle_read or handle_error.

I tried to take a look at how Twisted manages the thing but it seems
that OOB is not even supported.
Maybe someone with more experience in using select.poll could clarify that.
File name Uploaded
asyncore.diff giampaolo.rodola, 2007-12-02.17:54:16
Date User Action Args
2007-12-02 17:54:17giampaolo.rodolasetspambayes_score: 0.0330135 -> 0.0330135
recipients: + giampaolo.rodola
2007-12-02 17:54:16giampaolo.rodolasetspambayes_score: 0.0330135 -> 0.0330135
messageid: <>
2007-12-02 17:54:16giampaolo.rodolalinkissue1541 messages
2007-12-02 17:54:16giampaolo.rodolacreate