When a response times out the fctx_cancelquery() function incorrectly calculates it in the 'dns_resstatscounter_queryrtt5' counter (i.e. >=1600 ms). To avoid this, the rctx_timedout() function should make sure that 'rctx->finish' is NULL. And in order to adjust the RTT values for the timed out server, 'rctx->no_response' should be true. Update the rctx_timedout() function to make those changes.