// Once we connect we send them.
// This can also be invoked concurrently from different threads, so it gets a little
// tricky
ConnectionHolder holder = connections.get(theServerID);
if (holder == null) {
NetClient client = vertx.createNetClient();
// When process is creating a lot of connections this can take some time
// so increase the timeout
client.setConnectTimeout(60 * 1000);
holder = new ConnectionHolder(client);
ConnectionHolder prevHolder = connections.putIfAbsent(theServerID, holder);
if (prevHolder != null) {
// Another one sneaked in
holder = prevHolder;