Skip to content

Instantly share code, notes, and snippets.

@hishaamn
Created March 4, 2024 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hishaamn/c643f608fde4764285f37edad330c94b to your computer and use it in GitHub Desktop.
Save hishaamn/c643f608fde4764285f37edad330c94b to your computer and use it in GitHub Desktop.
// Original Implementation
protected virtual bool WaitForDedicatedServers(DispatchNewsletterArgs args)
{
bool flag = false;
bool flag2 = true;
while (flag2)
{
int totalNumServers;
int num = _dedicatedServersService.Status(args.Message, out totalNumServers);
if (num > 0)
{
flag = true;
}
flag2 = args.DispatchInterruptRequest == DispatchInterruptSignal.None && (!flag || num > 0);
if (flag2)
{
_manualResetEvent.WaitOne(_timeToWaitBetweenChecks);
}
}
return args.DispatchInterruptRequest == DispatchInterruptSignal.None;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment