private void cleanupEndpointsWithDeadConnections() { for (ClientEndpoint endpoint : clientEndpointManager.getEndpoints()) { if (!endpoint.getConnection().isAlive()) { //if connection is not alive, it means we come across an edge case. //normally connection close should remove endpoint from client endpoint manager //this means that connection.close happened before, authentication complete(endpoint registered to manager) //therefore connection.close could not remove the endpoint. //we will remove the endpoint here when detected. if (logger.isFineEnabled()) { logger.fine("Cleaning up endpoints with dead connection " + endpoint); } clientEndpointManager.removeEndpoint(endpoint); } } }
private void cleanupEndpointsWithDeadConnections() { for (ClientEndpoint endpoint : clientEndpointManager.getEndpoints()) { if (!endpoint.getConnection().isAlive()) { //if connection is not alive, it means we come across an edge case. //normally connection close should remove endpoint from client endpoint manager //this means that connection.close happened before, authentication complete(endpoint registered to manager) //therefore connection.close could not remove the endpoint. //we will remove the endpoint here when detected. if (logger.isFineEnabled()) { logger.fine("Cleaning up endpoints with dead connection " + endpoint); } clientEndpointManager.removeEndpoint(endpoint); } } }