Skip to content

Commit

Permalink
Merge pull request #547 from openziti/remove.excess.transport.debug
Browse files Browse the repository at this point in the history
remove debug output from non-erroring transport requests
  • Loading branch information
andrewpmartinez authored Apr 17, 2024
2 parents b0dec70 + 6eb258b commit a12fda0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions edge-apis/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,16 @@ func (c *ClientTransportPoolRandom) TryTransportForF(cb func(*ApiClientTransport
activeKey = active.ApiUrl.String()
result, err := cb(active)

if err == nil || !errorIndicatesControllerSwap(err) {
pfxlog.Logger().WithError(err).Debugf("determine a network error did not occur on (%T) returning", err)
if err == nil {
return result, err
}

if !errorIndicatesControllerSwap(err) {
pfxlog.Logger().WithError(err).Debugf("determined that error (%T) does not indicate controller swap, returning error", err)
return result, err
}

pfxlog.Logger().WithError(err).Debugf("encountered network error (%T) while submitting request", err)
pfxlog.Logger().WithError(err).Debugf("encountered error (%T) while submitting request indicating controller swap", err)

if c.pool.Count() == 1 {
pfxlog.Logger().Debug("active transport failed, only 1 transport in pool")
Expand Down

0 comments on commit a12fda0

Please sign in to comment.