async Task PostTaskProcAsync(CancellationToken cancel = default) { int num_try = 0; while (true) { int interval; IPAddress tmp = await LocalNet.GetMyPrivateIpAsync(cancel); if (tmp._GetIPAddressType().Bit(IPAddressType.Loopback) == false) { this.CurrentLocalIp = tmp; } num_try++; if (await PostHttpMainAsync(cancel)._TryAwaitAndRetBool(true)) { num_try = 0; } if (cancel.IsCancellationRequested) { break; } interval = Util.GenRandIntervalWithRetry(Config.PostIntervalMsecs, num_try + 1, Config.PostIntervalMsecs * 30); await cancel._WaitUntilCanceledAsync(interval); } }