return to previous time calculation login
this logic is deeply flawed and needs an async dns lookup mechanism to work correctly
This commit is contained in:
parent
3959c3d0b8
commit
b98a2100ee
@ -260,7 +260,6 @@ def main():
|
||||
try: # send DNS request
|
||||
stime = time.time()
|
||||
resolver.query(hostname, dnsrecord, ipttl=ttl)
|
||||
etime = time.time()
|
||||
except dns.resolver.NoNameservers as e:
|
||||
if not quiet:
|
||||
print("no or bad response:", e)
|
||||
@ -296,6 +295,7 @@ def main():
|
||||
finally:
|
||||
icmp_socket.close()
|
||||
|
||||
etime = time.time()
|
||||
elapsed = abs(etime - stime) * 1000 # convert to milliseconds
|
||||
|
||||
if reached:
|
||||
|
Loading…
x
Reference in New Issue
Block a user