summaryrefslogtreecommitdiffstats
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
authorJosiah Carlson <josiah.carlson@gmail.com>2008-07-07 05:04:12 (GMT)
committerJosiah Carlson <josiah.carlson@gmail.com>2008-07-07 05:04:12 (GMT)
commit9f2f83338f54a769497fd122e86170aa58cf5603 (patch)
tree525f6de8d461e6fe1d7c2824e1aa08b7e8d2a285 /Lib/asyncore.py
parent35bf9bf68cf70ead3f52c95a677cb27505dec9f9 (diff)
downloadcpython-9f2f83338f54a769497fd122e86170aa58cf5603.zip
cpython-9f2f83338f54a769497fd122e86170aa58cf5603.tar.gz
cpython-9f2f83338f54a769497fd122e86170aa58cf5603.tar.bz2
Fixed bugs 760475, 953599, and 1519. This is a translation of changelist 64768
to the py3k branch.
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r--Lib/asyncore.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index e82d24b..586358c 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -98,8 +98,10 @@ def readwrite(obj, flags):
obj.handle_read_event()
if flags & select.POLLOUT:
obj.handle_write_event()
- if flags & (select.POLLERR | select.POLLHUP | select.POLLNVAL):
+ if flags & (select.POLLERR | select.POLLNVAL):
obj.handle_expt_event()
+ if flags & select.POLLHUP:
+ obj.handle_close_event()
except (ExitNow, KeyboardInterrupt, SystemExit):
raise
except:
@@ -466,7 +468,7 @@ class dispatcher:
),
'error'
)
- self.close()
+ self.handle_close()
def handle_expt(self):
self.log_info('unhandled exception', 'warning')