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 6b750a3 commit a057f37
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api_inference_community/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,19 @@ def already_left(request: Request) -> bool:
logger.info("Connection %s", connection)
counter += 1
if connection.status != "ESTABLISHED":
logger.debug("Connection %s, not established")
continue
if not connection.laddr:
logger.debug("Connection %s, no laddr")
continue
if int(connection.laddr.port) != port:
logger.debug("Connection %s, port %s != port %s", int(connection.laddr.port), port)
continue
if (
not connection.laddr.ip
or ipaddress.ip_address(connection.laddr.ip) != host
):
logger.debug("Connection %s, ip %s != ip %s", connection.laddr.ip, host)
continue
logger.info(
"Found caller connection still established, caller is most likely still there, %s",
Expand Down

0 comments on commit a057f37

Please sign in to comment.