Rev 264 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 264 | Rev 266 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | public class MKWatchDog |
14 | public class MKWatchDog |
15 | implements Runnable,DUBwiseDefinitions |
15 | implements Runnable,DUBwiseDefinitions |
16 | { |
16 | { |
17 | MKCommunicator mk=null; |
17 | MKCommunicator mk=null; |
Line 18... | Line 18... | ||
18 | 18 | ||
Line 19... | Line 19... | ||
19 | int debug_data_count_buff=-123; |
19 | int bytes_in_count_buff=-123; |
20 | 20 | ||
Line 21... | Line 21... | ||
21 | public MKWatchDog(MKCommunicator _mk) |
21 | public MKWatchDog(MKCommunicator _mk) |
Line 174... | Line 174... | ||
174 | default: |
174 | default: |
175 | // mk.log("uncactched intent " +mk.root.canvas.user_intent ); |
175 | // mk.log("uncactched intent " +mk.root.canvas.user_intent ); |
176 | break; |
176 | break; |
177 | } |
177 | } |
Line 178... | Line -... | ||
178 | - | ||
179 | // if ((!mk.ufo_prober.is_incompatible())) |
- | |
180 | {/* |
- | |
181 | |
- | |
182 | mk.log("watchdog after main loop"); |
- | |
183 | if (debug_data_count_buff==mk.stats.debug_data_count) |
- | |
184 | { |
- | |
185 | mk.log("timeout:" +conn_check_timeout ); |
- | |
186 | conn_check_timeout++; |
- | |
187 | if (conn_check_timeout==1000) |
- | |
188 | { |
- | |
189 | mk.log("disconnecting"); |
- | |
190 | mk.close_connections(false); |
- | |
191 | conn_check_timeout=0; |
- | |
192 | } |
- | |
193 | debug_data_count_buff=mk.stats.debug_data_count; |
- | |
194 | } |
- | |
195 | else |
- | |
196 | conn_check_timeout=0; |
- | |
Line 197... | Line -... | ||
197 | |
- | |
198 | - | ||
199 | */ |
- | |
200 | /*else if ((mk.root.canvas.user_intent==USER_INTENT_RAWDEBUG) || (mk.root.canvas.user_intent==USER_INTENT_GRAPH) ) |
- | |
201 | { |
- | |
202 | mk.trigger_debug(); |
- | |
203 | try { Thread.sleep(100); } |
- | |
204 | catch (Exception e) { } |
- | |
205 | } |
- | |
206 | */ |
- | |
207 | - | ||
208 | - | ||
209 | - | ||
210 | - | ||
211 | - | ||
Line -... | Line 178... | ||
- | 178 | ||
- | 179 | ||
- | 180 | ||
- | 181 | if (bytes_in_count_buff==mk.stats.bytes_in) |
|
- | 182 | if ((conn_check_timeout++)*BASE_SLEEP>3000) |
|
Line 212... | Line -... | ||
212 | - | ||
213 | /* |
183 | { |
214 | - | ||
215 | 184 | conn_check_timeout=0; |
|
- | 185 | mk.close_connections(false); |
|
- | 186 | ||
Line 216... | Line -... | ||
216 | if (debug_data_count_buff==mk.debug_data_count) |
- | |
Line 217... | Line -... | ||
217 | { |
- | |
218 | // mk.close_connections(false); |
- | |
219 | } |
- | |
220 | - | ||
221 | */ |
- | |
222 | - | ||
223 | /*if (mk.version.major==-1) |
- | |
224 | mk.get_version(); |
- | |
225 | else |
- | |
226 | */ |
- | |
227 | /*for ( int cnt=0;cnt<5;cnt++) |
- | |
228 | if (mk.params.field[cnt]==null) |
- | |
229 | { |
- | |
230 | mk.get_params(cnt+1); |
- | |
231 | break; |
- | |
232 | }*/ |
- | |
233 | /* |
- | |
234 | for (int c=0;c<32;c++) |
- | |
235 | if (!mk.debug_data.got_name[c]) |
- | |
236 | { |
- | |
237 | mk.get_debug_name(c); |
- | |
238 | break; |
- | |
239 | } |
187 | } |
Line 240... | Line 188... | ||
240 | */ |
188 | else |
241 | 189 | conn_check_timeout=0; |