Commits

Anonymous committed 8e449de

Changed to socket error code instead of message.

Comments (0)

Files changed (1)

cherrypy/wsgiserver/__init__.py

                 try:
                     host, port = sock.getsockname()[:2]
                 except socket.error, x:
-                    if x.args[1] != "Bad file descriptor":
+                    if x.args[0] in socket_errors_to_ignore:
+                        # Changed to use error code and not message
+                        # See http://www.cherrypy.org/ticket/860.
                         raise
                 else:
                     # Note that we're explicitly NOT using AI_PASSIVE,