fix: set connection timeouts + clean up bad contexts
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Closes coop-cloud/organising#205.
This commit is contained in:
@ -118,6 +118,10 @@ All communication between Abra and the server will use this SSH connection.
|
||||
ctx := context.Background()
|
||||
cl, err := client.New(domainName)
|
||||
if err != nil {
|
||||
logrus.Warn("cleaning up context due to connection failure")
|
||||
if err := client.DeleteContext(domainName); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
@ -125,6 +129,10 @@ All communication between Abra and the server will use this SSH connection.
|
||||
if strings.Contains(err.Error(), "command not found") {
|
||||
logrus.Fatalf("docker is not installed on '%s'?", domainName)
|
||||
} else {
|
||||
logrus.Warn("cleaning up context due to connection failure")
|
||||
if err := client.DeleteContext(domainName); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
logrus.Fatalf("unable to make a connection to '%s'?", domainName)
|
||||
}
|
||||
logrus.Debug(err)
|
||||
|
Reference in New Issue
Block a user