Skip to content

Commit

Permalink
make listen port colissions in CI less likely (#11164)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn authored and emlowe committed Apr 21, 2022
1 parent d868534 commit cfaf202
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/util/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def find_available_listen_port(name: str = "free") -> int:
global recent_ports

while True:
port = secrets.randbits(15) + 2000
port = secrets.randbelow(0xFFFF - 1024) + 1024
if port in recent_ports:
continue

Expand Down

0 comments on commit cfaf202

Please sign in to comment.