last fix
This commit is contained in:
@@ -98,7 +98,7 @@ public class ApiServer(string apiUrl) : IApiServer
|
|||||||
|
|
||||||
protected virtual void WaitForSlot()
|
protected virtual void WaitForSlot()
|
||||||
{
|
{
|
||||||
if (MaxConcurentConnections == int.MaxValue)
|
if (!AllowMultipleRequests)
|
||||||
return; // Unlimited in this case
|
return; // Unlimited in this case
|
||||||
semaphore ??= new(MaxConcurentConnections, MaxConcurentConnections);
|
semaphore ??= new(MaxConcurentConnections, MaxConcurentConnections);
|
||||||
semaphore.Wait();
|
semaphore.Wait();
|
||||||
@@ -257,8 +257,11 @@ public class ApiServer(string apiUrl) : IApiServer
|
|||||||
|
|
||||||
// Listen for new request
|
// Listen for new request
|
||||||
if (!AllowMultipleRequests)
|
if (!AllowMultipleRequests)
|
||||||
|
{
|
||||||
|
FreeSlot();
|
||||||
Receive();
|
Receive();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected virtual void CheckContext(HttpListenerContext context)
|
protected virtual void CheckContext(HttpListenerContext context)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user