Thread-safety improvements around reading the connectionPools map