Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-10-08 08:16:01 -0400
committerUwe Stieber2013-10-08 08:16:01 -0400
commit362ea6895e88ac28362403df88f2557b2129867f (patch)
treefb98016a4db862bec7536f1a5449d32c67ac8136 /target_explorer
parent1d3a1c40f04d1aa4e84bca80cb880a7e60f3ee2e (diff)
downloadorg.eclipse.tcf-362ea6895e88ac28362403df88f2557b2129867f.tar.gz
org.eclipse.tcf-362ea6895e88ac28362403df88f2557b2129867f.tar.xz
org.eclipse.tcf-362ea6895e88ac28362403df88f2557b2129867f.zip
Target Explorer: Rollback of WaitForReadyStep is killing the whole communication to the target but should not
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/WaitForReadyStep.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/WaitForReadyStep.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/WaitForReadyStep.java
index c11904a8f..8cdee75c7 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/WaitForReadyStep.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.locator/src/org/eclipse/tcf/te/tcf/locator/steps/WaitForReadyStep.java
@@ -17,17 +17,19 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.tcf.protocol.IPeer;
+import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.te.runtime.callback.Callback;
import org.eclipse.tcf.te.runtime.concurrent.util.ExecutorsUtil;
import org.eclipse.tcf.te.runtime.interfaces.callback.ICallback;
import org.eclipse.tcf.te.runtime.interfaces.properties.IPropertiesContainer;
+import org.eclipse.tcf.te.runtime.stepper.StepperAttributeUtil;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IFullQualifiedId;
import org.eclipse.tcf.te.runtime.stepper.interfaces.IStepContext;
import org.eclipse.tcf.te.runtime.utils.ProgressHelper;
import org.eclipse.tcf.te.runtime.utils.StatusHelper;
import org.eclipse.tcf.te.tcf.core.Tcf;
+import org.eclipse.tcf.te.tcf.core.interfaces.steps.ITcfStepAttributes;
import org.eclipse.tcf.te.tcf.locator.activator.CoreBundleActivator;
import org.eclipse.tcf.te.tcf.locator.interfaces.nodes.IPeerModelProperties;
import org.eclipse.tcf.te.tcf.locator.interfaces.services.ILocatorModelRefreshService;
@@ -137,13 +139,15 @@ public class WaitForReadyStep extends AbstractPeerModelStep {
*/
@Override
public void rollback(IStepContext context, IPropertiesContainer data, IStatus status, IFullQualifiedId fullQualifiedId, IProgressMonitor monitor, ICallback callback) {
- final IPeer peer = getActivePeerContext(context, data, fullQualifiedId);
- Protocol.invokeAndWait(new Runnable() {
- @Override
- public void run() {
- Tcf.getChannelManager().shutdown(peer);
- }
- });
+ final IChannel channel = (IChannel)StepperAttributeUtil.getProperty(ITcfStepAttributes.ATTR_CHANNEL, fullQualifiedId, data);
+ if (channel != null) {
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ Tcf.getChannelManager().closeChannel(channel);
+ }
+ });
+ }
super.rollback(context, data, status, fullQualifiedId, monitor, callback);
}
}

Back to the top