Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/osgi
diff options
context:
space:
mode:
authorslewis2018-08-01 14:31:15 -0400
committerslewis2018-08-01 14:31:15 -0400
commit7fd6c2d24ddbb99b7f743ab85101cc817a5d48d4 (patch)
treef4c2492ebf2292145d22356fa32549892694a5a7 /osgi
parent80536625cf4f8bc516acab935d56b5662134d89c (diff)
downloadorg.eclipse.ecf-7fd6c2d24ddbb99b7f743ab85101cc817a5d48d4.tar.gz
org.eclipse.ecf-7fd6c2d24ddbb99b7f743ab85101cc817a5d48d4.tar.xz
org.eclipse.ecf-7fd6c2d24ddbb99b7f743ab85101cc817a5d48d4.zip
Improved fix for bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=537583 Change-Id: I0000000000000000000000000000000000000000
Diffstat (limited to 'osgi')
-rw-r--r--osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java
index ee5ce5ecd..b0383f989 100644
--- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java
+++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/osgi/services/remoteserviceadmin/RemoteServiceAdmin.java
@@ -592,12 +592,21 @@ public class RemoteServiceAdmin implements org.osgi.service.remoteserviceadmin.R
this.containerAdapter = containerAdapter;
this.remoteServiceListener = new IRemoteServiceListener() {
public void handleServiceEvent(IRemoteServiceEvent event) {
- Collection<ExportRegistration> regs = null;
- synchronized (this) {
- regs = new ArrayList(activeExportRegistrations);
+ if (event instanceof IRemoteServiceUnregisteredEvent) {
+ IRemoteServiceReference ref = ((IRemoteServiceUnregisteredEvent) event).getReference();
+ Collection<ExportRegistration> regs = null;
+ synchronized (ExportEndpoint.this) {
+ regs = new ArrayList(activeExportRegistrations);
+ }
+ for(ExportRegistration r: regs) {
+ IRemoteServiceRegistration rsReg = r.getRemoteServiceRegistration();
+ if (rsReg != null) {
+ IRemoteServiceReference rsRef = rsReg.getReference();
+ if (rsRef != null && rsRef.equals(ref))
+ r.close();
+ }
+ }
}
- for(ExportRegistration r: regs)
- r.close();
}};
Assert.isNotNull(originalProperties);
this.originalProperties = originalProperties;

Back to the top