Fix NPE bug when creating connection group in ConnectionManager
- The NPE will occur when multiple threads are trying to create the connection group for the same namespace Signed-off-by: Eric Zhao <sczyh16@gmail.com>
This commit is contained in:
parent
412e1ece47
commit
cd02fad290
|
|
@ -55,7 +55,7 @@ public final class ConnectionManager {
|
|||
ConnectionGroup group = CONN_MAP.get(namespace);
|
||||
if (group == null) {
|
||||
synchronized (CREATE_LOCK) {
|
||||
if (CONN_MAP.get(namespace) == null) {
|
||||
if ((group = CONN_MAP.get(namespace)) == null) {
|
||||
group = new ConnectionGroup(namespace);
|
||||
CONN_MAP.put(namespace, group);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue