diff --git a/client/common.go b/client/common.go index fbcaac35..eff95724 100644 --- a/client/common.go +++ b/client/common.go @@ -288,11 +288,6 @@ func (x *contextCall) processCall() bool { // initializes static cross-call parameters inherited from client. func (c *Client) initCallContext(ctx *contextCall) { ctx.key = c.prm.key - c.initCallContextWithoutKey(ctx) -} - -// initializes static cross-call parameters inherited from client except private key. -func (c *Client) initCallContextWithoutKey(ctx *contextCall) { ctx.resolveAPIFailures = c.prm.resolveNeoFSErrors ctx.callbackResp = c.prm.cbRespInfo ctx.netMagic = c.prm.netMagic diff --git a/client/object_delete.go b/client/object_delete.go index c669d0c1..543c1b41 100644 --- a/client/object_delete.go +++ b/client/object_delete.go @@ -148,11 +148,9 @@ func (c *Client) ObjectDelete(ctx context.Context, prm PrmObjectDelete) (*ResObj res ResObjectDelete ) + c.initCallContext(&cc) if prm.keySet { - c.initCallContextWithoutKey(&cc) cc.key = prm.key - } else { - c.initCallContext(&cc) } cc.req = &req diff --git a/client/object_get.go b/client/object_get.go index 0bf0729d..c1a1ccb5 100644 --- a/client/object_get.go +++ b/client/object_get.go @@ -499,11 +499,9 @@ func (c *Client) ObjectHead(ctx context.Context, prm PrmObjectHead) (*ResObjectH res.idObj = prm.objID + c.initCallContext(&cc) if prm.keySet { - c.initCallContextWithoutKey(&cc) cc.key = prm.key - } else { - c.initCallContext(&cc) } cc.req = &req diff --git a/client/session.go b/client/session.go index f90c10b4..66875a21 100644 --- a/client/session.go +++ b/client/session.go @@ -110,11 +110,9 @@ func (c *Client) SessionCreate(ctx context.Context, prm PrmSessionCreate) (*ResS res ResSessionCreate ) + c.initCallContext(&cc) if prm.keySet { - c.initCallContextWithoutKey(&cc) cc.key = prm.key - } else { - c.initCallContext(&cc) } cc.meta = prm.prmCommonMeta