Fix Docker daemon wait
Also, a few various cleanups are bundled: 1. Only call GetDriver() once to get the object in provision/utils.go 2. SSH command wrapper will return the error and let the consumer decide what to do with it instead of bailing automatically on non-255 Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
package ssh
|
||||
|
||||
import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/docker/machine/libmachine/log"
|
||||
)
|
||||
|
||||
func WaitForTCP(addr string) error {
|
||||
for {
|
||||
log.Debugf("Testing TCP connection to: %s", addr)
|
||||
conn, err := net.DialTimeout("tcp", addr, 2*time.Second)
|
||||
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
defer conn.Close()
|
||||
return nil
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user