code: OtpCookedConnection getConnection(final String anode) {
          OtpPeer peer = null;
          OtpCookedConnection conn = null;
  
          synchronized (connections) {
              // first just try looking up the name as-is
              conn = connections.get(anode);
  
              if (conn == null) {
                  // in case node had no '@' add localhost info and try again
                  peer = new OtpPeer(anode);
                  conn = connections.get(peer.node());
  
                  if (conn == null) {
                      try {
                          conn = new OtpCookedConnection(this, peer);
                          conn.setFlags(connFlags);
                          addConnection(conn);
                      } catch (final Exception e) {
                          /* false = outgoing */
                          connAttempt(peer.node(), false, e);
                      }
                  }
              }
              return conn;
          }
      }
docs: /*
  find or create a connection to the given node