summaryrefslogtreecommitdiff
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
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 e82d24bf4f..586358cff1 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')