mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 21:44:18 +02:00
Update src/fastmcp/utilities/http.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
97c9b9cbe4
commit
9cc67eeb70
1 changed files with 1 additions and 1 deletions
|
|
@ -3,6 +3,6 @@ import socket
|
|||
|
||||
def find_available_port() -> int:
|
||||
"""Find an available port by letting the OS assign one."""
|
||||
with socket.socket() as s:
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
s.bind(("127.0.0.1", 0))
|
||||
return s.getsockname()[1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue