Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,18 +262,22 @@ func connect(ctx context.Context, cfg Config) (*Client, error) {
}()

var errs []error
for errChan != nil {
Outer:
for {
select {
// Use the first client to successfully connect in syncConnect.
case clt := <-cltChan:
go func() {
for range errChan {
}
}()
return clt, nil
case err, ok := <-errChan:
if ok {
// Add a new line to make errs human readable.
errs = append(errs, trace.Wrap(err, ""))
continue
if !ok {
break Outer
}
errChan = nil
// Add a new line to make errs human readable.
errs = append(errs, trace.Wrap(err, ""))
}
}

Expand Down