fix magic-dns feature gate

This commit is contained in:
Luna Yao
2026-04-04 05:51:49 +02:00
parent d94cb3a96d
commit 385ff54b3e
13 changed files with 156 additions and 117 deletions
+3 -4
View File
@@ -1,6 +1,5 @@
use crate::common::global_ctx::{ArcGlobalCtx, GlobalCtxEvent};
use crate::common::scoped_task::ScopedTask;
use crate::dns::config::{DNS_SERVER_ELECTION_INTERVAL, DNS_SERVER_RPC_ADDR};
use crate::dns::config::{DnsGlobalCtxExt, DNS_SERVER_ELECTION_INTERVAL, DNS_SERVER_RPC_ADDR};
use crate::dns::peer_mgr::DnsPeerMgr;
use crate::dns::server::DnsServer;
use crate::instance::instance::ArcNicCtx;
@@ -114,14 +113,14 @@ impl DnsNode {
server.register(&rpc);
self.global_ctx.set_dns(Some(server.clone()));
self.global_ctx.set_dns_server(Some(server.clone()));
tokio::join!(
self.peer_mgr
.add_nic_packet_process_pipeline(Box::new(server.clone())),
server.run(token.child_token())
);
self.global_ctx.set_dns(None);
self.global_ctx.set_dns_server(None);
let _ = self
.peer_mgr
.remove_nic_packet_process_pipeline(server.id())