Skip to content

Commit

Permalink
Bind test socket to localhost and not every host
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Jun 28, 2022
1 parent 33b7160 commit 97cebaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1948,7 +1948,7 @@ def _getfreeport():
Determines a free port using sockets.
"""
free_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
free_socket.bind(("0.0.0.0", 0))
free_socket.bind(("127.0.0.1", 0))
free_socket.listen()
port = free_socket.getsockname()[1]
free_socket.close()
Expand Down

0 comments on commit 97cebaa

Please sign in to comment.