Fix panic for DOCKER_HOST without ://

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 660cc4a2675d34695406b2506344a2a18f2a59e9
Component: engine
This commit is contained in:
Alexandr Morozov
2014-08-26 20:32:10 +04:00
parent f9e7d27fe5
commit fef7b9ee0d

View File

@ -44,7 +44,8 @@ func main() {
// If we do not have a host, default to unix socket
defaultHost = fmt.Sprintf("unix://%s", api.DEFAULTUNIXSOCKET)
}
if _, err := api.ValidateHost(defaultHost); err != nil {
defaultHost, err := api.ValidateHost(defaultHost)
if err != nil {
log.Fatal(err)
}
flHosts = append(flHosts, defaultHost)