Commits

Robert Brewer committed 96286a7

Fix for #530 (CherryPyWSGIServer does not always initalize self.socket) in 2.x and trunk.

Comments (0)

Files changed (1)

cherrypy/_cpwsgiserver.py

                 self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
                 self.socket.bind(self.bind_addr)
             else:
+                self.socket = None
+                msg = "No socket could be created"
                 for res in info:
                     af, socktype, proto, canonname, sa = res
                     try: