From 11abaa7f6891eb97b0355900e1fad9a2f79519ef Mon Sep 17 00:00:00 2001 From: Angira Kekteeva Date: Wed, 23 Jun 2021 17:55:17 +0300 Subject: [PATCH] Change order of CallOptions in return of pool.conn Moved WithSession with session token got from pool.Connection to the top of returned slice because it overlaps WithSession in 'option' parameter Signed-off-by: Angira Kekteeva --- pkg/pool/pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/pool/pool.go b/pkg/pool/pool.go index a8b36424..c1265ea1 100644 --- a/pkg/pool/pool.go +++ b/pkg/pool/pool.go @@ -218,7 +218,7 @@ func (p *pool) conn(option []client.CallOption) (client.Client, []client.CallOpt if err != nil { return nil, nil, err } - return conn, append(option, client.WithSession(token)), nil + return conn, append([]client.CallOption{client.WithSession(token)}, option...), nil } func (p *pool) PutObject(ctx context.Context, params *client.PutObjectParams, option ...client.CallOption) (*object.ID, error) {