Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2013-11-25 08:15:28 -0500
committerTobias Schwarz2013-11-25 08:15:28 -0500
commitbe73191188ca3d2783817efffe1024225d2c2612 (patch)
tree85a1772533db7993910b0017f0dd86b5273541be /target_explorer
parentd0663de337b90ce8a936db87bff4724ff3acf0df (diff)
downloadorg.eclipse.tcf-be73191188ca3d2783817efffe1024225d2c2612.tar.gz
org.eclipse.tcf-be73191188ca3d2783817efffe1024225d2c2612.tar.xz
org.eclipse.tcf-be73191188ca3d2783817efffe1024225d2c2612.zip
Target Explorer: cleanup value adds after last channel closed
Diffstat (limited to 'target_explorer')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java
index fa2a64556..ee5b5b2fb 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.core/src/org/eclipse/tcf/te/tcf/core/internal/ChannelManager.java
@@ -481,7 +481,8 @@ public final class ChannelManager extends PlatformObject implements IChannelMana
Assert.isTrue(Protocol.isDispatchThread(), "Illegal Thread Access"); //$NON-NLS-1$
// Get the id of the remote peer
- String id = channel.getRemotePeer().getID();
+ IPeer peer = channel.getRemotePeer();
+ String id = peer.getID();
if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_CHANNEL_MANAGER)) {
CoreBundleActivator.getTraceHandler().trace(NLS.bind(Messages.ChannelManager_closeChannel_message, id),
@@ -495,6 +496,12 @@ public final class ChannelManager extends PlatformObject implements IChannelMana
if (counter == null || counter.decrementAndGet() == 0) {
channel.close();
+ // Get the value-add's for the peer to shutdown
+ IValueAdd[] valueAdds = ValueAddManager.getInstance().getValueAdd(peer);
+ if (valueAdds != null && valueAdds.length > 0) {
+ internalShutdownValueAdds(peer, valueAdds);
+ }
+
if (CoreBundleActivator.getTraceHandler().isSlotEnabled(0, ITraceIds.TRACE_CHANNEL_MANAGER)) {
CoreBundleActivator.getTraceHandler().trace(NLS.bind(Messages.ChannelManager_closeChannel_closed_message, id),
0, ITraceIds.TRACE_CHANNEL_MANAGER, IStatus.INFO, this);

Back to the top