MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / timeoutError

Function timeoutError

utils/ssh.go:746–751  ·  view source on GitHub ↗
(maxWait int, lastErr error)

Source from the content-addressed store, hash-verified

744}
745
746func timeoutError(maxWait int, lastErr error) error {
747 if lastErr != nil {
748 return fmt.Errorf("%w: SSH connection timeout after %d seconds: %w", ErrSSHUnreachable, maxWait, lastErr)
749 }
750 return fmt.Errorf("%w: SSH connection timeout after %d seconds", ErrSSHUnreachable, maxWait)
751}
752
753func WaitForTCPPort(ctx context.Context, host string, port int, overallTimeout time.Duration) error {
754 address := net.JoinHostPort(host, strconv.Itoa(port))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected