Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-10-09 16:20:31 -0400
committerEike Stepper2008-10-09 16:20:31 -0400
commitaed1230b201ad2d8af05f31ae97279555887a95b (patch)
tree845fbde518e1c9280f61a53da585071594311253
parent65d77b8194001ffb56d4587f156d3c6d250fae57 (diff)
downloadcdo-aed1230b201ad2d8af05f31ae97279555887a95b.tar.gz
cdo-aed1230b201ad2d8af05f31ae97279555887a95b.tar.xz
cdo-aed1230b201ad2d8af05f31ae97279555887a95b.zip
Protected selectionKey in doDeactivate
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
index 8b901215bd..478c5f638e 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
@@ -347,11 +347,16 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
@Override
protected void doDeactivate() throws Exception
{
- selectionKey.cancel();
+ if (selectionKey != null)
+ {
+ selectionKey.cancel();
+ selectionKey = null;
+ }
LifecycleUtil.deactivate(controlChannel);
- IOUtil.closeSilent(socketChannel);
controlChannel = null;
+
+ IOUtil.closeSilent(socketChannel);
socketChannel = null;
super.doDeactivate();
}

Back to the top