[#28] Clients: Make immutable parameters

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2024-12-02 19:33:45 +03:00
parent 749000a090
commit 9bb7b5eff8
62 changed files with 2742 additions and 963 deletions

View file

@ -83,8 +83,7 @@ public class ClientWrapper : ClientStatusMonitor
try
{
var prmNodeInfo = new PrmNodeInfo(ctx);
var response = await Client!.GetNodeInfoAsync(prmNodeInfo).ConfigureAwait(false);
var response = await Client!.GetNodeInfoAsync(ctx).ConfigureAwait(false);
return false;
}
catch (RpcException)
@ -105,11 +104,7 @@ public class ClientWrapper : ClientStatusMonitor
{
client = new(WrapperPrm, sessionCache);
var dialCtx = new CallContext
{
Timeout = TimeSpan.FromTicks((long)WrapperPrm.DialTimeout),
CancellationToken = ctx.CancellationToken
};
var dialCtx = new CallContext(TimeSpan.FromTicks((long)WrapperPrm.DialTimeout), ctx.CancellationToken);
var error = await client.Dial(ctx).ConfigureAwait(false);
if (!string.IsNullOrEmpty(error))
@ -132,8 +127,7 @@ public class ClientWrapper : ClientStatusMonitor
try
{
var prmNodeInfo = new PrmNodeInfo(ctx);
var res = await Client.GetNodeInfoAsync(prmNodeInfo).ConfigureAwait(false);
var res = await Client.GetNodeInfoAsync(ctx).ConfigureAwait(false);
}
catch (FrostFsException)
{