Skip to content

Commit

Permalink
bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (pythonGH-…
Browse files Browse the repository at this point in the history
  • Loading branch information
Erlend Egeberg Aasland authored Jun 24, 2021
1 parent 2c1ae09 commit b5a52ee
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Lib/test/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2443,9 +2443,14 @@ def wrap_conn(self):
self.server.conn_errors.append(str(e))
if self.server.chatty:
handle_error("\n server: bad connection attempt from " + repr(self.addr) + ":\n")
self.running = False
self.server.stop()
self.close()

# bpo-44229, bpo-43855, bpo-44237, and bpo-33450:
# Ignore spurious EPROTOTYPE returned by write() on macOS.
# See also http://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/
if e.errno != errno.EPROTOTYPE and sys.platform != "darwin":
self.running = False
self.server.stop()
self.close()
return False
else:
self.server.shared_ciphers.append(self.sslconn.shared_ciphers())
Expand Down

0 comments on commit b5a52ee

Please sign in to comment.