mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-22 09:29:50 +00:00
Failover.CNAME: Fixed issue in GetAnswers() to select only A/AAAA type for health check monitoring.
This commit is contained in:
@@ -58,7 +58,14 @@ namespace Failover
|
||||
|
||||
private DnsResourceRecord[] GetAnswers(string domain, DnsQuestionRecord question, string zoneName, uint appRecordTtl, string healthCheck, Uri healthCheckUrl)
|
||||
{
|
||||
HealthCheckResponse response = _healthService.QueryStatus(domain, question.Type, healthCheck, healthCheckUrl, true);
|
||||
DnsResourceRecordType healthCheckRecordType;
|
||||
|
||||
if (question.Type == DnsResourceRecordType.AAAA)
|
||||
healthCheckRecordType = DnsResourceRecordType.AAAA;
|
||||
else
|
||||
healthCheckRecordType = DnsResourceRecordType.A;
|
||||
|
||||
HealthCheckResponse response = _healthService.QueryStatus(domain, healthCheckRecordType, healthCheck, healthCheckUrl, true);
|
||||
switch (response.Status)
|
||||
{
|
||||
case HealthStatus.Unknown:
|
||||
|
||||
Reference in New Issue
Block a user