Skip to content

Commit

Permalink
Merge pull request #32 from plaintextpackets/issue_27
Browse files Browse the repository at this point in the history
Fixed issue with 0 data returned when DNS times out
  • Loading branch information
plaintextpackets authored May 4, 2024
2 parents 8f27178 + 6270f0b commit 152713a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion helpers/network_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,18 @@ def dnstest(self,site,nameserver):
}

self.dnsstats.append(dnsdata)

except Exception as e:
print(f"Error performing DNS resolution on {nameserver}")
print(e)
return False

dnsdata = {
"nameserver":nameserver[0],
"nameserver_ip":nameserver[1],
"latency":5000
}

self.dnsstats.append(dnsdata)

return True

Expand Down

0 comments on commit 152713a

Please sign in to comment.