private synchronized int ensureListening(InetAddress inetAddress) {
    for (ListeningConnection connection : myListeningConnections) {
      if (connection.myAddress.equals(inetAddress)) {
        return connection.myListenPort;
      }
    }
    return startListening(inetAddress);
  }
private synchronized int ensureListening(InetAddress inetAddress)