This commit is contained in:
Ferdinand Schober
2024-07-11 00:51:49 +02:00
parent c58f5dbdd5
commit 3f7dae65a2
2 changed files with 4 additions and 7 deletions

View File

@@ -2,7 +2,8 @@ use log;
use std::{ use std::{
cell::{Cell, RefCell}, cell::{Cell, RefCell},
collections::HashSet, collections::HashSet,
rc::Rc, sync::Arc, rc::Rc,
sync::Arc,
}; };
use tokio::{signal, sync::Notify}; use tokio::{signal, sync::Notify};
use tokio_util::sync::CancellationToken; use tokio_util::sync::CancellationToken;
@@ -124,11 +125,8 @@ impl Server {
// create dns resolver // create dns resolver
let resolver = dns::DnsResolver::new().await?; let resolver = dns::DnsResolver::new().await?;
let (mut resolver_task, resolve_tx) = resolver_task::new( let (mut resolver_task, resolve_tx) =
resolver, resolver_task::new(resolver, self.clone(), frontend_notify_tx);
self.clone(),
frontend_notify_tx,
);
// frontend listener // frontend listener
let (mut frontend_task, frontend_tx) = frontend_task::new( let (mut frontend_task, frontend_tx) = frontend_task::new(

View File

@@ -79,7 +79,6 @@ fn handle_frontend_stream(
#[cfg(windows)] stream: ReadHalf<TcpStream>, #[cfg(windows)] stream: ReadHalf<TcpStream>,
cancellation_token: CancellationToken, cancellation_token: CancellationToken,
) -> JoinHandle<()> { ) -> JoinHandle<()> {
let tx = frontend_tx.clone(); let tx = frontend_tx.clone();
tokio::task::spawn_local(async move { tokio::task::spawn_local(async move {
tokio::select! { tokio::select! {