mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
First get a new port, then close the offending.
This commit is contained in:
parent
659705becb
commit
580271d966
1 changed files with 2 additions and 1 deletions
|
@ -173,8 +173,9 @@ def get_unused_localhost_port():
|
|||
port = usock.getsockname()[1]
|
||||
if port in (54505, 54506, 64505, 64506, 64510, 64511):
|
||||
# These ports are hardcoded in the test configuration
|
||||
port = get_unused_localhost_port()
|
||||
usock.close()
|
||||
return get_unused_localhost_port()
|
||||
return port
|
||||
|
||||
_RUNTESTS_PORTS[port] = usock
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue