INNER CODE UNIT · Python
process_request
cipi-sh/cipi · lib/cipi-crowdsec-rescue.py:206
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:
super().process_request_thread(request, client_address)
finally:
_slots.release()
def finish_request(self, request, client_address) -> None: