From: Josiah Carlson Date: Tue, 31 Mar 2009 21:49:36 +0000 (+0000) Subject: Made handle_expt_event() be called last, so that we don't accidentally read X-Git-Tag: v2.7a1~1663 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aba27dd6d9bcd6de8f028505d837915b6a1828b7;p=thirdparty%2FPython%2Fcpython.git Made handle_expt_event() be called last, so that we don't accidentally read after closing the socket. --- diff --git a/Lib/asyncore.py b/Lib/asyncore.py index f9b0fdfae263..07b0499fd143 100644 --- a/Lib/asyncore.py +++ b/Lib/asyncore.py @@ -97,14 +97,14 @@ def _exception(obj): def readwrite(obj, flags): try: - if flags & select.POLLPRI: - obj.handle_expt_event() if flags & select.POLLIN: obj.handle_read_event() if flags & select.POLLOUT: obj.handle_write_event() if flags & (select.POLLHUP | select.POLLERR | select.POLLNVAL): obj.handle_close() + if flags & select.POLLPRI: + obj.handle_expt_event() except _reraised_exceptions: raise except: