Issue #12039: Now suppress spurious select.error raised on FreeBSD when the server (an asyncore.dispatcher) is closed.
This commit is contained in:
parent
00bc6ccb78
commit
e73afad50f
|
@ -723,7 +723,14 @@ class TestSMTPServer(smtpd.SMTPServer):
|
|||
:func:`select` or :func:`poll` call by
|
||||
:func:`asyncore.loop`.
|
||||
"""
|
||||
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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue