diff --git a/src/main/user-impl/java/com/mysql/cj/jdbc/ha/plugins/efm2/Monitor.java b/src/main/user-impl/java/com/mysql/cj/jdbc/ha/plugins/efm2/Monitor.java index c2b6662d2..b08c53de8 100644 --- a/src/main/user-impl/java/com/mysql/cj/jdbc/ha/plugins/efm2/Monitor.java +++ b/src/main/user-impl/java/com/mysql/cj/jdbc/ha/plugins/efm2/Monitor.java @@ -46,6 +46,7 @@ import java.util.Map; import java.util.Properties; import java.util.Queue; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; @@ -65,7 +66,7 @@ public class Monitor implements IMonitor { protected static final Executor ABORT_EXECUTOR = Executors.newSingleThreadExecutor(); private final Queue> activeContexts = new ConcurrentLinkedQueue<>(); - private final HashMap>> newContexts = new HashMap<>(); + private final Map>> newContexts = new ConcurrentHashMap<>(); private final AtomicBoolean stopped = new AtomicBoolean(false); private Connection monitoringConn = null;