File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2385,9 +2385,14 @@ def wrap_conn(self):
23852385 self .server .conn_errors .append (str (e ))
23862386 if self .server .chatty :
23872387 handle_error ("\n server: bad connection attempt from " + repr (self .addr ) + ":\n " )
2388- self .running = False
2389- self .server .stop ()
2390- self .close ()
2388+
2389+ # bpo-44229, bpo-43855, bpo-44237, and bpo-33450:
2390+ # Ignore spurious EPROTOTYPE returned by write() on macOS.
2391+ # See also http://erickt.github.io/blog/2014/11/19/adventures-in-debugging-a-potential-osx-kernel-bug/
2392+ if e .errno != errno .EPROTOTYPE and sys .platform != "darwin" :
2393+ self .running = False
2394+ self .server .stop ()
2395+ self .close ()
23912396 return False
23922397 else :
23932398 self .server .shared_ciphers .append (self .sslconn .shared_ciphers ())
You can’t perform that action at this time.
0 commit comments