summaryrefslogtreecommitdiffstats
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r--Lib/asyncore.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 5740fe1..e79593a 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -212,7 +212,13 @@ class dispatcher:
# I think it should inherit this anyway
self.socket.setblocking (0)
self.connected = 1
- self.addr = sock.getpeername()
+ # XXX Does the constructor require that the socket passed
+ # be connected?
+ try:
+ self.addr = sock.getpeername()
+ except socket.error:
+ # The addr isn't crucial
+ pass
else:
self.socket = None