Skip to content

Commit

Permalink
Fix unexpected message ID suppression
Browse files Browse the repository at this point in the history
- `dnsperf`:
  - Fix nonsensical latency values produced by -O suppress=unexpected
  • Loading branch information
pspacek committed Feb 1, 2023
1 parent 5f833aa commit 97c849c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/dnsperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,11 +1186,13 @@ do_recv(void* arg)
perf_log_warning("received short response");
continue;
}
if (recvd[i].unexpected && !tinfo->config->suppress.unexpected) {
perf_log_warning("received a response with an "
"unexpected (maybe timed out) "
"id: %u",
recvd[i].qid);
if (recvd[i].unexpected) {
if (!tinfo->config->suppress.unexpected) {
perf_log_warning("received a response with an "
"unexpected (maybe timed out) "
"id: %u",
recvd[i].qid);
}
continue;
}
latency = recvd[i].when - recvd[i].sent;
Expand Down

0 comments on commit 97c849c

Please sign in to comment.