From 976af73cf3ad8915ba28034d851786acb63f141f Mon Sep 17 00:00:00 2001 From: kblasinski Date: Mon, 24 May 2021 11:41:11 +0200 Subject: [PATCH] Make TransferRequest timeouts editable with reflection I am a Relativity engineer, we are using Data Movement library to transfer huge portions of data. We experience failures for slower networks and bigger files. We were able to solve this by overriding those timeouts with reflection, unfortunately this doesn't work on .net core as those properties are marked 'readonly'. Alternatively I could make this properly and expose those parameters to client, although for our usecase this is sufficient. --- lib/Transfer_RequestOptions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Transfer_RequestOptions.cs b/lib/Transfer_RequestOptions.cs index ff444d9e..0b01664e 100644 --- a/lib/Transfer_RequestOptions.cs +++ b/lib/Transfer_RequestOptions.cs @@ -31,16 +31,16 @@ internal static class Transfer_RequestOptions /// /// Stores the default maximum execution time across all potential retries. /// - private static readonly TimeSpan DefaultMaximumExecutionTime = + private static TimeSpan DefaultMaximumExecutionTime = TimeSpan.FromSeconds(900); /// /// Stores the default server timeout. /// - private static readonly TimeSpan DefaultServerTimeout = + private static TimeSpan DefaultServerTimeout = TimeSpan.FromSeconds(300); - public static readonly TimeSpan DefaultCreationServerTimeout = + public static TimeSpan DefaultCreationServerTimeout = TimeSpan.FromSeconds(30); ///