Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/PingTimeoutSection.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/PingTimeoutSection.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/PingTimeoutSection.java
index 6cee2255d..e7862697c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/PingTimeoutSection.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/sections/PingTimeoutSection.java
@@ -122,7 +122,12 @@ public class PingTimeoutSection extends AbstractSection implements IDataExchange
String value = SWTControlUtil.getText(verbosity);
if (value != null && !"".equals(value)) { //$NON-NLS-1$
- attributes.setProperty(IPeerProperties.PROP_PING_TIMEOUT, value);
+ int timeout = -1;
+ try {
+ timeout = Integer.decode(value).intValue();
+ } catch (NumberFormatException e) { /* ignored on purpose */ }
+
+ attributes.setProperty(IPeerProperties.PROP_PING_TIMEOUT, timeout != -1 && timeout != defaultPingTimeout ? value : Integer.toString(defaultPingTimeout));
}
}

Back to the top