fix: use IdleConnTimeout/ConnectTimeout
All checks were successful
continuous-integration/drone/push Build is passing

This is an attempt to set sensible timeouts on abra connections. This
might not be the last word on this but it seems that SSH connections now
bail out correctly and other kinds of commands don't explode (e.g.
logs).

Closes coop-cloud/organising#222.
Closes coop-cloud/organising#218.
This commit is contained in:
2021-11-02 15:49:11 +01:00
parent ede5a59562
commit e37b49201f
5 changed files with 12 additions and 11 deletions

View File

@ -4,6 +4,7 @@ import (
"errors"
"fmt"
commandconnPkg "coopcloud.tech/abra/pkg/upstream/commandconn"
command "github.com/docker/cli/cli/command"
dConfig "github.com/docker/cli/cli/config"
context "github.com/docker/cli/cli/context"
@ -44,7 +45,7 @@ func createContext(name string, host string) error {
Endpoints: make(map[string]contextStore.EndpointTLSData),
}
dockerEP, dockerTLS, err := getDockerEndpointMetadataAndTLS(host)
dockerEP, dockerTLS, err := commandconnPkg.GetDockerEndpointMetadataAndTLS(host)
if err != nil {
return err
}