INNER CODE UNIT · Python
get_request
cipi-sh/cipi · lib/cipi-crowdsec-rescue.py:201
def get_request(self):
sock, addr = super().get_request()
sock.settimeout(HANDSHAKE_TIMEOUT)
return sock, addr
def process_request(self, request, client_address) -> None:
if not _slots.acquire(blocking=False):
sys.stderr.write("rescue: at capacity, dropped %s\n" % (client_address[0],))
self.shutdown_request(request)
return
try:
super().process_request(request, client_address)
except BaseException:
_slots.release()
raise
def process_request_thread(self, request, client_address) -> None:
try: