release semaphore
This commit is contained in:
parent
3e916f0b3f
commit
baf0d2f304
@ -117,9 +117,9 @@ namespace FastGithub.DomainResolve
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.dnsStateCache.TryGetValue<bool>(dns, out var state))
|
if (this.dnsStateCache.TryGetValue<bool>(dns, out var available))
|
||||||
{
|
{
|
||||||
return state;
|
return available;
|
||||||
}
|
}
|
||||||
|
|
||||||
var key = dns.ToString();
|
var key = dns.ToString();
|
||||||
@ -139,6 +139,10 @@ namespace FastGithub.DomainResolve
|
|||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
return this.dnsStateCache.Set(dns, false, this.stateExpiration);
|
return this.dnsStateCache.Set(dns, false, this.stateExpiration);
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
semaphore.Release();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user