1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Bug 310274: Need a longer timeout for remote targets. Ultimately this timeout should be a preference.

This commit is contained in:
Marc Khouzam 2010-05-26 14:59:25 +00:00
parent 9381be7ba2
commit 0e6aaedf11

View file

@ -708,13 +708,16 @@ public class GDBBackend extends AbstractDsfService implements IGDBBackend {
*
* The specified timeout is used to indicate how many milliseconds
* this job should wait for. INTERRUPT_TIMEOUT_DEFAULT indicates
* to use the default of 500 ms. The default is also use if the
* to use the default of 5 seconds. The default is also use if the
* timeout value is 0 or negative.
*
* @since 3.0
*/
protected class MonitorInterruptJob extends Job {
private final static int TIMEOUT_DEFAULT_VALUE = 500;
// Bug 310274. Until we have a preference to configure timeouts,
// we need a large enough default timeout to accommodate slow
// remote sessions.
private final static int TIMEOUT_DEFAULT_VALUE = 5000;
private final RequestMonitor fRequestMonitor;
public MonitorInterruptJob(int timeout, RequestMonitor rm) {
@ -723,7 +726,7 @@ public class GDBBackend extends AbstractDsfService implements IGDBBackend {
fRequestMonitor = rm;
if (timeout == INTERRUPT_TIMEOUT_DEFAULT || timeout <= 0) {
timeout = TIMEOUT_DEFAULT_VALUE; // default of 0.5 seconds
timeout = TIMEOUT_DEFAULT_VALUE; // default of 5 seconds
}
schedule(timeout);