Jeremiah Lowin Copilot commited on
Commit
6b8482e
·
unverified ·
1 Parent(s): 446f852

Update src/fastmcp/utilities/http.py

Browse files

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Files changed (1) hide show
  1. src/fastmcp/utilities/http.py +1 -1
src/fastmcp/utilities/http.py CHANGED
@@ -3,6 +3,6 @@ import socket
3
 
4
  def find_available_port() -> int:
5
  """Find an available port by letting the OS assign one."""
6
- with socket.socket() as s:
7
  s.bind(("127.0.0.1", 0))
8
  return s.getsockname()[1]
 
3
 
4
  def find_available_port() -> int:
5
  """Find an available port by letting the OS assign one."""
6
+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
7
  s.bind(("127.0.0.1", 0))
8
  return s.getsockname()[1]