Show More
@@ -117,7 +117,7 b' class InputStreamChunker(Thread):' | |||
|
117 | 117 | s = self.source |
|
118 | 118 | t = self.target |
|
119 | 119 | cs = self.chunk_size |
|
120 | ccm = self.chunk_count_max | |
|
120 | chunk_count_max = self.chunk_count_max | |
|
121 | 121 | keep_reading = self.keep_reading |
|
122 | 122 | da = self.data_added |
|
123 | 123 | go = self.go |
@@ -127,15 +127,14 b' class InputStreamChunker(Thread):' | |||
|
127 | 127 | except ValueError: |
|
128 | 128 | b = '' |
|
129 | 129 | |
|
130 | timeout_input = 20 | |
|
130 | 131 | while b and go.is_set(): |
|
131 | if len(t) > ccm: | |
|
132 | if len(t) > chunk_count_max: | |
|
132 | 133 | keep_reading.clear() |
|
133 |
keep_reading.wait( |
|
|
134 | ||
|
135 | if not keep_reading.wait(10): | |
|
136 | raise Exception( | |
|
137 | "Timed out while waiting for input to be read.") | |
|
138 | ||
|
134 | keep_reading.wait(timeout_input) | |
|
135 | if len(t) > chunk_count_max + timeout_input: | |
|
136 | raise IOError( | |
|
137 | "Timed out while waiting for input from subprocess.") | |
|
139 | 138 | t.append(b) |
|
140 | 139 | da.set() |
|
141 | 140 | b = s.read(cs) |
General Comments 0
You need to be logged in to leave comments.
Login now