Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred-landrum committed Jul 17, 2023
1 parent 5b9e56c commit 7dd76fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client/history/redirector.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ func (r *basicRedirector) redirectLoop(ctx context.Context, address rpcAddress,
}
clientConn := r.connections.getOrCreateClientConn(address)
err := op(ctx, clientConn.historyClient)
if s, ok := err.(*serviceerrors.ShardOwnershipLost); ok && len(s.OwnerHost) != 0 {
// TODO: consider emitting a metric for number of redirects
address = rpcAddress(s.OwnerHost)
} else {
solErr, ok := err.(*serviceerrors.ShardOwnershipLost)
if !ok || len(solErr.OwnerHost) == 0 {
return err
}
// TODO: consider emitting a metric for number of redirects
address = rpcAddress(solErr.OwnerHost)
}
}

0 comments on commit 7dd76fd

Please sign in to comment.