This commit is contained in:
Pilzinsel64
2025-01-28 07:39:58 +01:00
parent 58794e5872
commit c7f343544d

View File

@@ -98,7 +98,7 @@ public class ApiServer(string apiUrl) : IApiServer
protected virtual void WaitForSlot()
{
if (MaxConcurentConnections == int.MaxValue)
if (!AllowMultipleRequests)
return; // Unlimited in this case
semaphore ??= new(MaxConcurentConnections, MaxConcurentConnections);
semaphore.Wait();
@@ -257,7 +257,10 @@ public class ApiServer(string apiUrl) : IApiServer
// Listen for new request
if (!AllowMultipleRequests)
{
FreeSlot();
Receive();
}
}
protected virtual void CheckContext(HttpListenerContext context)