utils(dirty): replace Notify with watch

This commit is contained in:
Luna Yao
2026-04-06 11:55:25 +02:00
parent a031b6f701
commit faa252fc39
4 changed files with 25 additions and 35 deletions
+3 -3
View File
@@ -225,7 +225,7 @@ impl DnsServer {
let reload_catalog = async {
loop {
dirty.catalog.notified().await;
dirty.catalog.wait().await;
if dirty.catalog.reset() {
self.catalog.replace(self.mgr.catalog()).await;
}
@@ -235,7 +235,7 @@ impl DnsServer {
let reload_addresses = async {
loop {
dirty.addresses.notified().await;
dirty.addresses.wait().await;
if dirty.addresses.reset() {
if let Err(e) = self.reload_addresses(self.mgr.iter_addresses()).await {
tracing::error!("failed to reload addresses: {:?}", e);
@@ -248,7 +248,7 @@ impl DnsServer {
let reload_listeners = async {
loop {
dirty.listeners.notified().await;
dirty.listeners.wait().await;
if dirty.listeners.reset() {
if let Err(e) = self
.reload_listeners(self.mgr.iter_listeners(), &mut runtime)