espnet2.train.distributed_utils.free_port
Less than 1 minute
espnet2.train.distributed_utils.free_port
espnet2.train.distributed_utils.free_port()
Find free port using bind().
There are some interval between finding this port and using it and the other process might catch the port by that time. Thus it is not guaranteed that the port is really empty.