[#532] object/hash: Fix NPE during request forwarding

In current implementation `Object.GetRangeHash` RPC handler forwards range
requests for payload data. Missing request forwarder of the original request
caused NPE during execution.

Do not call request forwarder if payload range hash is requested.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-05-18 15:13:40 +03:00 committed by Alex Vanin
parent 5e9513e008
commit 72e2bc8fb6
3 changed files with 18 additions and 4 deletions

View file

@ -80,7 +80,7 @@ func (c *clientCacheWrapper) get(addr string) (getClient, error) {
}
func (c *clientWrapper) getObject(exec *execCtx) (*objectSDK.Object, error) {
if !exec.assembling {
if !exec.assembling && !exec.hashOnly() {
return exec.prm.forwarder(c.client)
}