瀏覽代碼

fixed issue #657, fixed ConcurrentModificationException

七锋 7 年之前
父節點
當前提交
5349a5c49b
共有 1 個文件被更改,包括 2 次插入1 次删除
  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 {