Skip to content

Commit

Permalink
Better error is client did not reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
radekg committed Jan 10, 2022
1 parent c9e2b44 commit 8beb849
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"time"

"github.com/hashicorp/go-hclog"
"github.com/hashicorp/go-multierror"
"github.com/radekg/yugabyte-db-go-client/configs"
clientErrors "github.com/radekg/yugabyte-db-go-client/errors"
"google.golang.org/protobuf/reflect/protoreflect"
Expand Down Expand Up @@ -187,7 +188,7 @@ func (c *defaultYBClient) Execute(payload, response protoreflect.ProtoMessage) e
c.logger.Error("execute: failed reconnect consecutive maximum reconnect attempts",
"max-attempts", c.config.MaxReconnectAttempts,
"reason", tReconnectError.Cause)
return errNotReconnected
return multierror.Append(errNotReconnected, tReconnectError.Cause)
}

// retry:
Expand Down

0 comments on commit 8beb849

Please sign in to comment.