New submission from Giampaolo Rodola' <[EMAIL PROTECTED]>:

I discovered that some pyftpdlib [1] tests fail when using poll()
instead of select().
The problem is in asyncore.readwrite() function which erroneously calls
handle_read_event() in case of a POLLPRI event.

The patches modify readwrite() function so that:

- POLLPRI is now treated as synonym for "there is urgent data to read"
so handle_expt_event() is called.
- POLLHUP, POLLERR and POLLINVAL are now treated as synonyms for "the
connection has been closed" (Twisted behaves exactly the same) so
handle_close() is called.

Both pyftpdlib and asyncore tests passed on Linux Debian Etch and
FreeBSD 7.0-RC1.


[1] http://code.google.com/p/pyftpdlib/

----------
components: Library (Lib)
files: asyncore.patch
keywords: patch
messages: 76807
nosy: giampaolo.rodola, josiah.carlson, josiahcarlson
severity: normal
status: open
title: asyncore's urgent data management and connection closed events  are 
broken when using poll()
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file12206/asyncore.patch

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4501>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to