Commit c45a75f4 by Jason Song

fix concurrent modification exception for release message scanner

parent d21a6a19
...@@ -38,7 +38,7 @@ public class ReleaseMessageScanner implements InitializingBean { ...@@ -38,7 +38,7 @@ public class ReleaseMessageScanner implements InitializingBean {
private long maxIdScanned; private long maxIdScanned;
public ReleaseMessageScanner() { public ReleaseMessageScanner() {
listeners = Lists.newLinkedList(); listeners = Lists.newCopyOnWriteArrayList();
executorService = Executors.newScheduledThreadPool(1, ApolloThreadFactory executorService = Executors.newScheduledThreadPool(1, ApolloThreadFactory
.create("ReleaseMessageScanner", true)); .create("ReleaseMessageScanner", true));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment