summaryrefslogtreecommitdiffstats
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r--Lib/asyncore.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 7f06e43..861495d 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -346,12 +346,15 @@ class dispatcher:
# XXX can return either an address pair or None
try:
conn, addr = self.socket.accept()
- return conn, addr
+ except TypeError:
+ return None
except socket.error as why:
- if why.args[0] == EWOULDBLOCK:
- pass
+ if why.args[0] in (EWOULDBLOCK, ECONNABORTED):
+ return None
else:
raise
+ else:
+ return conn, addr
def send(self, data):
try: