diff --git a/.travis.yml b/.travis.yml
index 832369f4b..e4be6fb89 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,8 +16,7 @@ branches:
mono: none
# ASF requires .NET Core 2.0+
-# TODO: We should target stable 2.0.0 once it's released
-dotnet: 2.0.0-preview2-006497
+dotnet: 2.0.0
env:
global:
@@ -32,14 +31,14 @@ script:
RUNTIMES="generic win-x64 linux-x64 linux-arm osx-x64"
- dotnet build -c Release
- dotnet test -c Release --no-build --no-restore ArchiSteamFarm.Tests
+ dotnet build -c Release --no-restore
+ dotnet test ArchiSteamFarm.Tests -c Release --no-build --no-restore
for RUNTIME in $RUNTIMES; do
if [ "$RUNTIME" = "generic" ]; then
- dotnet publish -c Release -o "out/${RUNTIME}"
+ dotnet publish ArchiSteamFarm -c Release -o "out/${RUNTIME}" --no-restore
else
- dotnet publish -c Release -r "$RUNTIME" -o "out/${RUNTIME}"
+ dotnet publish ArchiSteamFarm -c Release -o "out/${RUNTIME}" -r "$RUNTIME" --no-restore
fi
echo "$RUNTIME" > "ArchiSteamFarm/out/${RUNTIME}/ArchiSteamFarm.version"
diff --git a/ArchiSteamFarm/ArchiSteamFarm.csproj b/ArchiSteamFarm/ArchiSteamFarm.csproj
index 7de425b6b..279512b4c 100644
--- a/ArchiSteamFarm/ArchiSteamFarm.csproj
+++ b/ArchiSteamFarm/ArchiSteamFarm.csproj
@@ -3,8 +3,8 @@
Exe
netcoreapp2.0
- 3.0.1.4
- 3.0.1.4
+ 3.0.1.5
+ 3.0.1.5
latest
none
ASF.ico
@@ -18,6 +18,8 @@
https://github.com/JustArchi/ArchiSteamFarm.git
https://github.com/JustArchi/ArchiSteamFarm/raw/master/resources/ASF.ico
Git
+ true
+ true
diff --git a/ArchiSteamFarm/GlobalConfig.cs b/ArchiSteamFarm/GlobalConfig.cs
index 423761f34..f8c9ee82a 100644
--- a/ArchiSteamFarm/GlobalConfig.cs
+++ b/ArchiSteamFarm/GlobalConfig.cs
@@ -49,6 +49,9 @@ namespace ArchiSteamFarm {
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool AutoUpdates = true;
+ [JsonProperty(Required = Required.DisallowNull)]
+ internal readonly byte BackgroundGCPeriod;
+
[SuppressMessage("ReSharper", "CollectionNeverUpdated.Global")]
[JsonProperty(Required = Required.DisallowNull)]
internal readonly HashSet Blacklist = new HashSet();
@@ -102,7 +105,7 @@ namespace ArchiSteamFarm {
internal readonly bool Statistics = true;
[JsonProperty(Required = Required.DisallowNull)]
- internal readonly ProtocolTypes SteamProtocols = ProtocolTypes.All;
+ internal readonly ProtocolTypes SteamProtocols = ProtocolTypes.Tcp;
[JsonProperty(Required = Required.DisallowNull)]
internal readonly EUpdateChannel UpdateChannel = EUpdateChannel.Stable;
diff --git a/ArchiSteamFarm/Hacks.cs b/ArchiSteamFarm/Hacks.cs
index 0980cba13..f9da6e68c 100644
--- a/ArchiSteamFarm/Hacks.cs
+++ b/ArchiSteamFarm/Hacks.cs
@@ -28,18 +28,21 @@ using System.Threading;
namespace ArchiSteamFarm {
internal static class Hacks {
- private const byte GarbageCollectorDelay = 1;
-
private static Timer GarbageCollectionTimer;
private static Timer GarbageCompactionTimer;
- internal static void Init() {
+ internal static void EnableBackgroundGC(byte period) {
+ if (period == 0) {
+ ASF.ArchiLogger.LogNullError(nameof(period));
+ return;
+ }
+
if (GarbageCollectionTimer == null) {
GarbageCollectionTimer = new Timer(
e => GC.Collect(),
null,
- TimeSpan.FromSeconds(GarbageCollectorDelay), // Delay
- TimeSpan.FromSeconds(GarbageCollectorDelay) // Period
+ TimeSpan.FromSeconds(period), // Delay
+ TimeSpan.FromSeconds(period) // Period
);
}
@@ -47,8 +50,8 @@ namespace ArchiSteamFarm {
GarbageCompactionTimer = new Timer(
e => GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce,
null,
- TimeSpan.FromMinutes(GarbageCollectorDelay), // Delay
- TimeSpan.FromMinutes(GarbageCollectorDelay) // Period
+ TimeSpan.FromMinutes(period), // Delay
+ TimeSpan.FromMinutes(period) // Period
);
}
}
diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs
index 2e0e44d41..2c1a0138a 100644
--- a/ArchiSteamFarm/Program.cs
+++ b/ArchiSteamFarm/Program.cs
@@ -31,7 +31,6 @@ using System.IO;
using System.Linq;
using System.Reflection;
using System.Resources;
-using System.Runtime;
using System.Threading.Tasks;
using ArchiSteamFarm.Localization;
using NLog;
@@ -238,8 +237,8 @@ namespace ArchiSteamFarm {
return;
}
- if (GCSettings.IsServerGC) {
- Hacks.Init();
+ if (GlobalConfig.BackgroundGCPeriod > 0) {
+ Hacks.EnableBackgroundGC(GlobalConfig.BackgroundGCPeriod);
}
if (!string.IsNullOrEmpty(GlobalConfig.CurrentCulture)) {
diff --git a/ArchiSteamFarm/config/ASF.json b/ArchiSteamFarm/config/ASF.json
index c33993c5e..8490d3bd0 100644
--- a/ArchiSteamFarm/config/ASF.json
+++ b/ArchiSteamFarm/config/ASF.json
@@ -1,6 +1,7 @@
{
"AutoRestart": true,
"AutoUpdates": true,
+ "BackgroundGCPeriod": 0,
"Blacklist": [],
"ConnectionTimeout": 60,
"CurrentCulture": null,
@@ -18,6 +19,6 @@
"OptimizationMode": 0,
"Statistics": true,
"SteamOwnerID": 0,
- "SteamProtocols": 7,
+ "SteamProtocols": 1,
"UpdateChannel": 1
}
\ No newline at end of file
diff --git a/appveyor.yml b/appveyor.yml
index cd238828a..a9d38b11f 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -28,9 +28,9 @@ after_test:
foreach ($RUNTIME in $RUNTIMES) {
if ($RUNTIME -eq 'generic') {
- dotnet publish -c "$env:CONFIGURATION" -o "out\$RUNTIME"
+ dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$RUNTIME" --no-restore
} else {
- dotnet publish -c "$env:CONFIGURATION" -r "$RUNTIME" -o "out\$RUNTIME"
+ dotnet publish ArchiSteamFarm -c "$env:CONFIGURATION" -o "out\$RUNTIME" -r "$RUNTIME" --no-restore
}
Set-Content -Path "ArchiSteamFarm\out\$RUNTIME\ArchiSteamFarm.version" -Value "$RUNTIME"
diff --git a/cc.sh b/cc.sh
index b6def0de1..4c606a983 100755
--- a/cc.sh
+++ b/cc.sh
@@ -44,7 +44,7 @@ if [[ "$CLEAN" -eq 1 ]]; then
fi
dotnet restore
-dotnet build -c "$BUILD" -o "$OUT" "${MSBUILD_ARGS[@]}"
+dotnet build -c "$BUILD" -o "$OUT" --no-restore "${MSBUILD_ARGS[@]}"
echo
echo "Compilation finished successfully! :)"
diff --git a/tools/crowdin-cli/crowdin-cli.jar b/tools/crowdin-cli/crowdin-cli.jar
index 66db1a22b..59ffb6bdc 100644
Binary files a/tools/crowdin-cli/crowdin-cli.jar and b/tools/crowdin-cli/crowdin-cli.jar differ