Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Raphael Glon <oOraph@users.noreply.github.com>
  • Loading branch information
oOraph committed Aug 31, 2024
1 parent 6bc69d1 commit b717975
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api_inference_community/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,15 @@ def already_left(request: Request) -> bool:

port = int(client.port)
host = ipaddress.ip_address(host)
logger.info("DEBUG" * 100)
logger.info("client %s", client)

if port <= 0 or port > 65535:
logger.warning("Unexpected source port format for caller %s", port)
return False
counter = 0
for connection in psutil.net_connections(kind="tcp"):
logger.info("Connection %s", connection)
counter += 1
if connection.status != "ESTABLISHED":
continue
Expand Down

0 comments on commit b717975

Please sign in to comment.