mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 13:25:45 +02:00
Bug 310274: Need a longer timeout for remote targets. Ultimately this timeout should be a preference.
This commit is contained in:
parent
9381be7ba2
commit
0e6aaedf11
1 changed files with 6 additions and 3 deletions
|
@ -708,13 +708,16 @@ public class GDBBackend extends AbstractDsfService implements IGDBBackend {
|
||||||
*
|
*
|
||||||
* The specified timeout is used to indicate how many milliseconds
|
* The specified timeout is used to indicate how many milliseconds
|
||||||
* this job should wait for. INTERRUPT_TIMEOUT_DEFAULT indicates
|
* 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.
|
* timeout value is 0 or negative.
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
protected class MonitorInterruptJob extends Job {
|
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;
|
private final RequestMonitor fRequestMonitor;
|
||||||
|
|
||||||
public MonitorInterruptJob(int timeout, RequestMonitor rm) {
|
public MonitorInterruptJob(int timeout, RequestMonitor rm) {
|
||||||
|
@ -723,7 +726,7 @@ public class GDBBackend extends AbstractDsfService implements IGDBBackend {
|
||||||
fRequestMonitor = rm;
|
fRequestMonitor = rm;
|
||||||
|
|
||||||
if (timeout == INTERRUPT_TIMEOUT_DEFAULT || timeout <= 0) {
|
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);
|
schedule(timeout);
|
||||||
|
|
Loading…
Add table
Reference in a new issue