mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
walk back some timeout changes
This commit is contained in:
@@ -24,7 +24,12 @@ public class PublishTask : MSBuildAsyncTask
|
||||
|
||||
protected override async Task<bool> ExecuteAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
TimeSpan timeout = Timeout == null ? TimeSpan.FromMinutes(30) : TimeSpan.Parse(Timeout);
|
||||
double timeout;
|
||||
if (double.TryParse(Timeout, out var parsedTimeout)) {
|
||||
timeout = parsedTimeout;
|
||||
} else {
|
||||
timeout = 30d;
|
||||
}
|
||||
|
||||
//System.Diagnostics.Debugger.Launch();
|
||||
var options = new VelopackFlowServiceOptions {
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<VelopackPackAuthors Condition="'$(VelopackPackAuthors)' == ''">$(Authors)</VelopackPackAuthors>
|
||||
<VelopackTargetRuntime Condition="'$(VelopackTargetRuntime)' == ''">$(RuntimeIdentifier)</VelopackTargetRuntime>
|
||||
<VelopackShortcuts Condition="'$(VelopackShortcuts)' == ''">Desktop,StartMenuRoot</VelopackShortcuts>
|
||||
<VelopackHttpTimeout Condition="'$(VelopackHttpTimeout)' == ''">00:30:00</VelopackHttpTimeout>
|
||||
<VelopackHttpTimeout Condition="'$(VelopackHttpTimeout)' == ''">30</VelopackHttpTimeout>
|
||||
<VelopackWaitForLive Condition="'$(VelopackWaitForLive)' == ''">false</VelopackWaitForLive>
|
||||
|
||||
<!-- Allows a cross platform app (eg. Avalonia) to specify all three via csproj and have them applied correctly -->
|
||||
|
||||
@@ -54,7 +54,7 @@ public class VelopackFlowServiceClient(
|
||||
|
||||
var client = new HttpClient(handler);
|
||||
client.DefaultRequestHeaders.Authorization = Authorization;
|
||||
client.Timeout = Options.Timeout;
|
||||
client.Timeout = TimeSpan.FromMinutes(Options.Timeout);
|
||||
return client;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,5 +6,5 @@ public class VelopackFlowServiceOptions
|
||||
|
||||
public string? ApiKey { get; set; } = string.Empty;
|
||||
|
||||
public TimeSpan Timeout { get; set; } = TimeSpan.FromMinutes(30);
|
||||
public double Timeout { get; set; } = 30d;
|
||||
}
|
||||
@@ -53,7 +53,6 @@ public static partial class OptionMapper
|
||||
|
||||
public static partial DeltaPatchOptions ToOptions(this DeltaPatchCommand cmd);
|
||||
|
||||
[MapperIgnoreTarget(nameof(LocalDownloadOptions.Timeout))]
|
||||
public static partial LoginOptions ToOptions(this LoginCommand cmd);
|
||||
|
||||
public static partial LogoutOptions ToOptions(this LogoutCommand cmd);
|
||||
|
||||
Reference in New Issue
Block a user