Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.ote.client')
-rw-r--r--plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java5
-rw-r--r--plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestHostConnection.java11
2 files changed, 14 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java
index fc32a4efbd0..df44c701157 100644
--- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java
+++ b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java
@@ -362,10 +362,11 @@ public class TestClientServiceImpl implements IOteClientService, IConnectorListe
@Override
public synchronized void onConnectorRemoved(IServiceConnector connector) {
- testHosts.remove(connector.getUniqueServerId());
+ String id = connector.getUniqueServerId();
+ testHosts.remove(id);
notifyHostUnavailable(connector, new OteServiceProperties(connector));
IHostTestEnvironment connectedHost = getConnectedHost();
- if (connectedHost != null) {
+ if (testConnection != null && testConnection.getId().equals(id)) {
testConnection = null;
listenerNotifier.notifyConnectionLost(connector);
}
diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestHostConnection.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestHostConnection.java
index 84dff6afe22..f5948cecb62 100644
--- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestHostConnection.java
+++ b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestHostConnection.java
@@ -11,6 +11,7 @@
package org.eclipse.osee.ote.service.core;
import java.rmi.RemoteException;
+
import org.eclipse.osee.connection.service.IServiceConnector;
import org.eclipse.osee.ote.core.environment.UserTestSessionKey;
import org.eclipse.osee.ote.core.environment.interfaces.IHostTestEnvironment;
@@ -28,6 +29,7 @@ class TestHostConnection {
private final ITestEnvironment connectEnvironment;
private final UserTestSessionKey sessionKey;
private final IHostTestEnvironment host;
+ private String serverId;
TestHostConnection(IServiceConnector connector, IHostTestEnvironment host, ITestEnvironment connectEnvironment, UserTestSessionKey sessionKey) {
// intentionally package-private
@@ -44,6 +46,11 @@ class TestHostConnection {
this.host = host;
this.connectEnvironment = connectEnvironment;
this.sessionKey = sessionKey;
+ try {
+ this.serverId = (String) host.getProperties().getProperty("id");
+ } catch (RemoteException e) {
+ this.serverId = "";
+ }
}
/**
@@ -74,6 +81,10 @@ class TestHostConnection {
return serviceConnector;
}
+ public String getId(){
+ return serverId;
+ }
+
void endConnection() throws RemoteException {
// intentionally package-private

Back to the top