Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Commit

Permalink
fix issue #20 - bad latency with unbound
Browse files Browse the repository at this point in the history
  • Loading branch information
dmachard committed Dec 20, 2020
1 parent c1843a0 commit 6c1c917
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dnstap_receiver/codecs/dnstap_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ async def cb_ondnstap(dnstap_decoder, payload, cfg, queues_list, stats, geoip_re

# compute latency
d1 = dm.query_time_sec + (round(dm.query_time_nsec ) / 1000000000)
latency = round(d2-d1,3)
latency = round(d2-d1,3) if d1 > 0 else 0.0

tap["latency"] = latency

# common params
Expand Down
2 changes: 1 addition & 1 deletion dnstap_receiver/dnstap.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ trace:
# enable verbose mode
verbose: false
# enable dnstap verbose mode
dnstap: false
dnstap: true

# rest api
web-api:
Expand Down

0 comments on commit 6c1c917

Please sign in to comment.