diff options
Diffstat (limited to 'cadi/client/src/main')
-rw-r--r-- | cadi/client/src/main/java/org/onap/aaf/cadi/locator/PropertyLocator.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cadi/client/src/main/java/org/onap/aaf/cadi/locator/PropertyLocator.java b/cadi/client/src/main/java/org/onap/aaf/cadi/locator/PropertyLocator.java index 9761937e..4591122c 100644 --- a/cadi/client/src/main/java/org/onap/aaf/cadi/locator/PropertyLocator.java +++ b/cadi/client/src/main/java/org/onap/aaf/cadi/locator/PropertyLocator.java @@ -137,7 +137,7 @@ public class PropertyLocator implements Locator<URI> { @Override public synchronized void invalidate(Item item) throws LocatorException { - if(--end<=0) { + if(--end<0) { refresh(); return; } @@ -186,7 +186,7 @@ public class PropertyLocator implements Locator<URI> { URI o,n; for(int j=0;j<ia.length;++j) { o = orig[i]; - Socket socket = new Socket(); + Socket socket = createSocket(); try { realname=ia[j].getHostAddress().equals(ia[j].getHostName())?ia[j].getCanonicalHostName():ia[j].getHostName(); int port = o.getPort(); @@ -251,6 +251,10 @@ public class PropertyLocator implements Locator<URI> { return false; } } + + protected Socket createSocket() { + return new Socket(); + } private class PLItem implements Item { public int idx,order; |