From 52ff5a579537915bde17d669558f87b6429333ff Mon Sep 17 00:00:00 2001 From: Stephen Akridge Date: Mon, 13 Aug 2018 10:07:19 -0700 Subject: [PATCH] Cap repair requests timeout --- src/streamer.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/streamer.rs b/src/streamer.rs index 0fcc6557892c76..70a03dc5aeb2d3 100644 --- a/src/streamer.rs +++ b/src/streamer.rs @@ -236,6 +236,9 @@ fn repair_window( } *last = consumed; *times += 1; + if *times > 128 { + *times = 65; + } //if times flips from all 1s 7 -> 8, 15 -> 16, we retry otherwise return Ok if *times & (*times - 1) != 0 { trace!("repair_window counter {} {} {}", *times, consumed, received);