last fix
This commit is contained in:
@@ -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,8 +257,11 @@ public class ApiServer(string apiUrl) : IApiServer
|
||||
|
||||
// Listen for new request
|
||||
if (!AllowMultipleRequests)
|
||||
{
|
||||
FreeSlot();
|
||||
Receive();
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void CheckContext(HttpListenerContext context)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user