Ticket #871: v6only.diff
-
cherrypy/wsgiserver/__init__.py
old new 1434 1434 ctx.use_certificate_file(self.ssl_certificate) 1435 1435 self.socket = SSLConnection(ctx, self.socket) 1436 1436 self.populate_ssl_environ() 1437 if hasattr(socket, "IPV6_V6ONLY") and \ 1438 family == socket.AF_INET6 and \ 1439 self.bind_addr[0] == '::': 1440 # If the app is listening on the V6 any address, 1441 # activate dual-stack. 1442 try: 1443 self.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0) 1444 except socket.error: 1445 # Apparently, the socket option is not available in 1446 # this machine's TCP stack 1447 pass 1437 1448 self.socket.bind(self.bind_addr) 1438 1449 1439 1450 def tick(self):

