Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed issue #2560

  • Loading branch information...
commit 284dd962c62485a1a97d1c742d965f564f09728c 1 parent 7f3d17c
@lvca lvca authored
View
22 server/src/main/java/com/orientechnologies/orient/server/OClientConnectionManager.java
@@ -43,11 +43,10 @@
import java.util.concurrent.atomic.AtomicInteger;
public class OClientConnectionManager {
+ private static final OClientConnectionManager instance = new OClientConnectionManager();
protected ConcurrentMap<Integer, OClientConnection> connections = new ConcurrentHashMap<Integer, OClientConnection>();
protected AtomicInteger connectionSerial = new AtomicInteger(0);
- private static final OClientConnectionManager instance = new OClientConnectionManager();
-
public OClientConnectionManager() {
final int delay = OGlobalConfiguration.SERVER_CHANNEL_CLEAN_DELAY.getValueAsInteger();
@@ -90,6 +89,10 @@ public Object getValue() {
});
}
+ public static OClientConnectionManager instance() {
+ return instance;
+ }
+
/**
* Create a connection.
*
@@ -234,10 +237,6 @@ public void disconnect(final OClientConnection iConnection) {
}
- public static OClientConnectionManager instance() {
- return instance;
- }
-
public List<OClientConnection> getConnections() {
return new ArrayList<OClientConnection>(connections.values());
}
@@ -254,9 +253,16 @@ public void pushDistribCfg2Clients(final ODocument iConfig) {
final Set<String> pushed = new HashSet<String>();
for (OClientConnection c : connections.values()) {
- if (pushed.contains(c.getRemoteAddress()))
- // ALREADY SENT: JUMP IT
+ try {
+ final String remoteAddress = c.getRemoteAddress();
+ if (pushed.contains(remoteAddress))
+ // ALREADY SENT: JUMP IT
+ continue;
+
+ } catch (Exception e) {
+ // SOCKET EXCEPTION SKIP IT
continue;
+ }
if (!(c.protocol instanceof ONetworkProtocolBinary))
// INVOLVE ONLY BINAR PROTOCOLS
Please sign in to comment.
Something went wrong with that request. Please try again.