mirror of
https://github.com/hashicorp/packer.git
synced 2026-09-25 01:04:00 -04:00
add a timeout trying to open a random port
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"math/rand"
|
||||
"net"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/packer/common/filelock"
|
||||
"github.com/hashicorp/packer/packer"
|
||||
@@ -97,5 +98,6 @@ func (lc ListenRangeConfig) Listen(ctx context.Context) (*Listener, error) {
|
||||
lock: lock,
|
||||
}, err
|
||||
|
||||
time.Sleep(20 * time.Millisecond)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user