mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Fix NRE in WebLimitRequest()
This was possible if plugin triggered WebLimitRequest() for unrecognized service.
This commit is contained in:
@@ -69,6 +69,8 @@ public static class ASF {
|
||||
[PublicAPI]
|
||||
public static WebBrowser? WebBrowser { get; private set; }
|
||||
|
||||
internal static readonly SemaphoreSlim OpenConnectionsSemaphore = new(WebBrowser.MaxConnections, WebBrowser.MaxConnections);
|
||||
|
||||
internal static ICrossProcessSemaphore? ConfirmationsSemaphore { get; private set; }
|
||||
internal static ICrossProcessSemaphore? GiftsSemaphore { get; private set; }
|
||||
internal static ICrossProcessSemaphore? InventorySemaphore { get; private set; }
|
||||
|
||||
@@ -1181,6 +1181,7 @@ public sealed class ArchiWebHandler : IDisposable {
|
||||
ASF.ArchiLogger.LogGenericWarning(string.Format(CultureInfo.CurrentCulture, Strings.WarningUnknownValuePleaseReport, nameof(service), service));
|
||||
|
||||
limiters.RateLimitingSemaphore = ASF.RateLimitingSemaphore;
|
||||
limiters.OpenConnectionsSemaphore = ASF.OpenConnectionsSemaphore;
|
||||
}
|
||||
|
||||
// Sending a request opens a new connection
|
||||
|
||||
Reference in New Issue
Block a user