INNER CODE UNIT · Python
handle_error
cipi-sh/cipi · lib/cipi-crowdsec-rescue.py:237
def handle_error(self, request, client_address) -> None:
sys.stderr.write("rescue: connection error from %s\n" % (client_address[0],))
class _TLSServer6(_TLSServer):
address_family = socket.AF_INET6
def server_bind(self) -> None:
try:
self.socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, 0)
except OSError:
pass
super().server_bind()
def main() -> int:
for path in (PORT_FILE, TOKEN_FILE, CERT_FILE, KEY_FILE):
if not os.path.isfile(path):