fix measure_rtt: flush data input buffer before measuring