Issue 13372: handle_close called twice in poll2 (original) (raw)

Issue13372

Created on 2011-11-08 17:32 by xdegaye, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
handle_close.diff xdegaye,2011-11-08 17:32 review
Messages (2)
msg147311 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2011-11-08 17:32
When use_poll is True, test_handle_close in test_asyncore.py invokes twice the handle_close() method. The attached patch: modifies test_handle_close so that it fails when handle_close() is called more than once includes a fix that makes readwrite() behave like poll(): check that the dispatcher instance is still in the socket map, before calling the handle_xxx methods
msg221136 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-21 00:27
To me the patched code in readwrite seems cut and paste. Could it be written something like this? have_fileno = not map or obj._fileno in map if have_fileno and flags & select.POLLIN: obj.handle_read_event() if have_fileno and flags & select.POLLOUT: obj.handle_write_event() if have_fileno and flags & select.POLLPRI: obj.handle_expt_event() if (have_fileno and flags & (select.POLLHUP | select.POLLERR select.POLLNVAL): obj.handle_close()
History
Date User Action Args
2022-04-11 14:57:23 admin set github: 57581
2021-10-21 11:31:21 iritkatriel set status: open -> closedsuperseder: Close asyncore/asynchat/smtpd issues and list them hereresolution: wont fixstage: resolved
2019-05-02 04:15:46 josiahcarlson set nosy: - josiahcarlson
2019-03-15 23:36:56 BreamoreBoy set nosy: - BreamoreBoy
2014-06-21 00:27:38 BreamoreBoy set nosy: + BreamoreBoymessages: + versions: + Python 3.4, Python 3.5, - Python 3.3
2011-11-08 17:32:12 xdegaye create