Bladeren bron

fixed issue #657, fixed ConcurrentModificationException

七锋 7 jaren geleden
bovenliggende
commit
5349a5c49b
1 gewijzigde bestanden met toevoegingen van 2 en 1 verwijderingen
  1. 2 1
      meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java

+ 2 - 1
meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java

@@ -83,7 +83,8 @@ public class MemoryMetaManager extends AbstractCanalLifeCycle implements CanalMe
     }
 
     public synchronized List<ClientIdentity> listAllSubscribeInfo(String destination) throws CanalMetaManagerException {
-        return destinations.get(destination);
+        // fixed issue #657, fixed ConcurrentModificationException
+        return Lists.newArrayList(destinations.get(destination));
     }
 
     public Position getCursor(ClientIdentity clientIdentity) throws CanalMetaManagerException {