##// END OF EJS Templates
git: handle flacky and slow connection issues with git....
marcink -
r357:305b33c6 stable
parent child Browse files
Show More
@@ -117,7 +117,7 b' class InputStreamChunker(Thread):'
117 s = self.source
117 s = self.source
118 t = self.target
118 t = self.target
119 cs = self.chunk_size
119 cs = self.chunk_size
120 ccm = self.chunk_count_max
120 chunk_count_max = self.chunk_count_max
121 keep_reading = self.keep_reading
121 keep_reading = self.keep_reading
122 da = self.data_added
122 da = self.data_added
123 go = self.go
123 go = self.go
@@ -127,15 +127,14 b' class InputStreamChunker(Thread):'
127 except ValueError:
127 except ValueError:
128 b = ''
128 b = ''
129
129
130 timeout_input = 20
130 while b and go.is_set():
131 while b and go.is_set():
131 if len(t) > ccm:
132 if len(t) > chunk_count_max:
132 keep_reading.clear()
133 keep_reading.clear()
133 keep_reading.wait(2)
134 keep_reading.wait(timeout_input)
134
135 if len(t) > chunk_count_max + timeout_input:
135 if not keep_reading.wait(10):
136 raise IOError(
136 raise Exception(
137 "Timed out while waiting for input from subprocess.")
137 "Timed out while waiting for input to be read.")
138
139 t.append(b)
138 t.append(b)
140 da.set()
139 da.set()
141 b = s.read(cs)
140 b = s.read(cs)
General Comments 0
You need to be logged in to leave comments. Login now