Skip to content

Commit

Permalink
[sd] Fix simple client port check (#1036)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhar authored Mar 5, 2025
1 parent c638043 commit 64f1317
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shortfin/python/shortfin_apps/sd/simple_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ async def async_range(count):
await asyncio.sleep(0.0)


def is_connected(host, port):
def is_connected(host: str, port: int) -> bool:
max_port = 65535
if port < 1 or port > max_port:
print(
Expand All @@ -193,7 +193,7 @@ def is_connected(host, port):
if requests.get(f"{url}/health", timeout=20).status_code == 200:
print("Successfully connected to server.")
ready = True
return
break
time.sleep(2)
print(".", end=None)
except:
Expand Down

0 comments on commit 64f1317

Please sign in to comment.