pub async fn start(&mut self) -> Result<()> {
        log::trace!("enter: start({:?})", self);

        while let Some(command) = self.receiver.recv().await {
            match command {
                Command::ScanInitialUrls(targets) => {
                    self.ordered_scan_url(targets, ScanOrder::Initial).await?;
                }
                Command::UpdateWordlist(wordlist) => {
                    self.wordlist(wordlist);
                }
                Command::JoinTasks(sender) => {
                    let ferox_scans = self.handles.ferox_scans().unwrap_or_default();
                    let limiter_clone = self.limiter.clone();

                    tokio::spawn(async move {
                        while ferox_scans.has_active_scans() {
                            tokio::time::sleep(Duration::from_millis(SLEEP_DURATION + 250)).await;
                        }
                        limiter_clone.close();
                        sender.send(true).expect("oneshot channel failed");
                    });
                }
                Command::TryRecursion(response) => {
                    self.try_recursion(response).await?;
                }
                Command::Sync(sender) => {
                    sender.send(true).unwrap_or_default();
                }
                _ => {} // no other commands needed for RecursionHandler
            }
        }

        log::trace!("exit: start");
        Ok(())
    }
/// Start a single consumer task (sc side of mpsc)
///
/// The consumer simply receives `Command` and acts accordingly
Start a single consumer task (sc side of mpsc)
The consumer simply receives `Command` and acts accordingly
Start a single consumer task ( sc side of mpsc ) The consumer simply receives ` Command ` and acts accordingly
pub async fn start(&mut self) -> Result<()> {
        log::trace!("enter: start({:?})", self);
        while let Some(command) = self.receiver.recv().await {
            match command {
                Command::ScanInitialUrls(targets) => {
                    self.ordered_scan_url(targets, ScanOrder::Initial).await?;
                }
                Command::UpdateWordlist(wordlist) => {
                    self.wordlist(wordlist);
                }
                Command::JoinTasks(sender) => {
                    let ferox_scans = self.handles.ferox_scans().unwrap_or_default();
                    let limiter_clone = self.limiter.clone();
                    tokio::spawn(async move {
                        while ferox_scans.has_active_scans() {
                            tokio::time::sleep(Duration::from_millis(SLEEP_DURATION + 250)).await;
                        }
                        limiter_clone.close();
                        sender.send(true).expect("oneshot channel failed");
                    });
                }
                Command::TryRecursion(response) => {
                    self.try_recursion(response).await?;
                }
                Command::Sync(sender) => {
                    sender.send(true).unwrap_or_default();
                }
                _ => {} // no other commands needed for RecursionHandler
            }
        }
        log::trace!("exit: start");
        Ok(())
    }
pub async fn start ( & mut self ) -> Result < ( ) > { log :: trace ! ( " " self ) ; while let Some ( command ) = self . receiver . recv ( ) . await { match command { Command :: ScanInitialUrls ( targets ) => { self . ordered_scan_url ( targets , ScanOrder :: Initial ) . await ? ; } Command :: UpdateWordlist ( wordlist ) => { self . wordlist ( wordlist ) ; } Command :: JoinTasks ( sender ) => { let ferox_scans = self . handles . ferox_scans ( ) . unwrap_or_default ( ) ; let limiter_clone = self . limiter . clone ( ) ; tokio :: spawn ( async move { while ferox_scans . has_active_scans ( ) { tokio :: time :: sleep ( Duration :: from_millis ( SLEEP_DURATION + 250 ) ) . await ; } limiter_clone . close ( ) ; sender . send ( true ) . expect ( " " ) ; } ) ; } Command :: TryRecursion ( response ) => { self . try_recursion ( response ) . await ? ; } Command :: Sync ( sender ) => { sender . send ( true ) . unwrap_or_default ( ) ; } _ => { } // no other commands needed for RecursionHandler } } log :: trace ! ( " " ) ; Ok ( ( ) ) }
Start a single consumer task (sc side of mpsc)
The consumer simply receives `Command` and acts accordingly
Start a single consumer task ( sc side of mpsc ) The consumer simply receives ` Command ` and acts accordingly
&mut self