Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFConnectorService.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFConnectorService.java b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFConnectorService.java
index 499c1c033..e49cb0294 100644
--- a/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFConnectorService.java
+++ b/plugins/org.eclipse.tcf.rse/src/org/eclipse/tcf/internal/rse/TCFConnectorService.java
@@ -171,11 +171,16 @@ public class TCFConnectorService extends StandardConnectorService implements ITC
public boolean isConnected() {
final boolean res[] = new boolean[1];
- Protocol.invokeAndWait(new Runnable() {
- public void run() {
- res[0] = channel != null && channel.getState() == IChannel.STATE_OPEN;
- }
- });
+ try {
+ Protocol.invokeAndWait(new Runnable() {
+ public void run() {
+ res[0] = channel != null && channel.getState() == IChannel.STATE_OPEN;
+ }
+ });
+ }
+ catch (IllegalStateException e) {
+ res[0] = false;
+ }
return res[0];
}

Back to the top