[gateway,arm] fix abort condition for retries

This commit is contained in:
akallabeth 2023-09-19 11:52:02 +02:00 committed by akallabeth
parent c1db0029d9
commit e5ad90627b

View File

@ -951,7 +951,9 @@ BOOL arm_resolve_endpoint(rdpContext* context, DWORD timeout)
const SSIZE_T delay = IFCALLRESULT(-1, instance->RetryDialog, instance, "arm-transport",
arm->gateway_retry, arm);
arm->gateway_retry++;
if (delay > 0)
if (delay <= 0)
break; /* error or no retry desired, abort loop */
else
{
WLog_DBG(TAG, "Delay for %" PRIdz "ms before next attempt", delay);
Sleep(delay);