Commit e73afad5 authored by Vinay Sajip's avatar Vinay Sajip

Issue #12039: Now suppress spurious select.error raised on FreeBSD when the...

Issue #12039: Now suppress spurious select.error raised on FreeBSD when the server (an asyncore.dispatcher) is closed.
parent 00bc6ccb
......@@ -723,7 +723,14 @@ class TestSMTPServer(smtpd.SMTPServer):
:func:`select` or :func:`poll` call by
:func:`asyncore.loop`.
"""
asyncore.loop(poll_interval, map=self.sockmap)
try:
asyncore.loop(poll_interval, map=self.sockmap)
except select.error:
# On FreeBSD 8, closing the server repeatably
# raises this error. We swallow it if the
# server has been closed.
if self.connected or self.accepting:
raise
def stop(self, timeout=None):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment