mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Remove obsolete workaround and require Mono 4.6+
This commit is contained in:
@@ -79,7 +79,7 @@ namespace ArchiSteamFarm {
|
||||
internal readonly byte IdleFarmingPeriod = 3;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal byte FarmingDelay { get; private set; } = DefaultFarmingDelay;
|
||||
internal readonly byte FarmingDelay = DefaultFarmingDelay;
|
||||
|
||||
[JsonProperty(Required = Required.DisallowNull)]
|
||||
internal readonly byte LoginLimiterDelay = 10;
|
||||
@@ -158,11 +158,6 @@ namespace ArchiSteamFarm {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ((globalConfig.FarmingDelay > 5) && Runtime.RequiresWorkaroundForMonoBug41701()) {
|
||||
Logging.LogGenericWarning("Your Mono runtime is affected by bug 41701, FarmingDelay of " + globalConfig.FarmingDelay + " is not possible - value of 5 will be used instead");
|
||||
globalConfig.FarmingDelay = 5;
|
||||
}
|
||||
|
||||
if (globalConfig.HttpTimeout == 0) {
|
||||
Logging.LogGenericWarning("Configured HttpTimeout is invalid: " + globalConfig.HttpTimeout);
|
||||
return null;
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace ArchiSteamFarm {
|
||||
return false;
|
||||
}
|
||||
|
||||
Version minMonoVersion = new Version(4, 4);
|
||||
Version minMonoVersion = new Version(4, 6);
|
||||
|
||||
if (monoVersion >= minMonoVersion) {
|
||||
Logging.LogGenericInfo("Your Mono version is OK. Required: " + minMonoVersion + " | Found: " + monoVersion);
|
||||
@@ -102,31 +102,6 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Remove me once Mono 4.6 is released
|
||||
internal static bool RequiresWorkaroundForMonoBug41701() {
|
||||
// Mono only, https://bugzilla.xamarin.com/show_bug.cgi?id=41701
|
||||
if (!IsRunningOnMono) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Version monoVersion = GetMonoVersion();
|
||||
|
||||
// The issue affects Mono versions from 4.3.2, 4.4.0 to 4.4.2 (inclusive) and from 4.5.0 to 4.5.2 (inclusive)
|
||||
if (monoVersion?.Major != 4) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (monoVersion.Minor) {
|
||||
case 3:
|
||||
return monoVersion.Build >= 2;
|
||||
case 4:
|
||||
case 5:
|
||||
return monoVersion.Build <= 2;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static Version GetNetVersion() {
|
||||
uint release;
|
||||
using (RegistryKey registryKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey("SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full\\")) {
|
||||
|
||||
Reference in New Issue
Block a user