Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAShi2020-03-01 08:26:56 +0000
committerAShi2020-03-01 08:26:56 +0000
commit46c2ebd59b94a231185a7eda9fe8d3893d1fdeb3 (patch)
treea9ad5a19242fce27b683a7deb51dc7ef5e8c5bee
parenteac51819eaf5341f24704187b69a60f3fd41ac27 (diff)
downloadorg.eclipse.tcf-46c2ebd59b94a231185a7eda9fe8d3893d1fdeb3.tar.gz
org.eclipse.tcf-46c2ebd59b94a231185a7eda9fe8d3893d1fdeb3.tar.xz
org.eclipse.tcf-46c2ebd59b94a231185a7eda9fe8d3893d1fdeb3.zip
Bug 560659 - Filed proxy connection when the proxy netwok get congestion.
Change-Id: Ib71413558bc45751c88e70613f62c768230b2285 Signed-off-by: AShi <Aijun.Shi@windriver.com>
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java20
1 files changed, 19 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java
index bf156ad52..0f037d4b4 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/channelmanager/steps/ChainPeerStep.java
@@ -135,8 +135,26 @@ public class ChainPeerStep extends AbstractPeerStep {
};
if (Protocol.isDispatchThread()) runnable.run();
- else Protocol.invokeLater(runnable);
+ else Protocol.invokeLater(getProxyDelay(), runnable);
}
+
+ private long getProxyDelay() {
+ int tcfProxyDelay = 1000;
+ String tcfRedirectDelayString = System.getProperty("tcfProxyDelay");
+ if ( null != tcfRedirectDelayString ) {
+ try {
+ tcfProxyDelay = Integer.parseInt(tcfRedirectDelayString);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ if (tcfProxyDelay < 10) {
+ tcfProxyDelay = 1000;
+ }
+
+ return tcfProxyDelay;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.tcf.te.runtime.stepper.steps.AbstractStep#rollback(org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext, org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer, org.eclipse.core.runtime.IStatus, org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId, org.eclipse.core.runtime.IProgressMonitor, org.eclipse.tcf.te.runtime.interfaces.callback.ICallback)

Back to the top