mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-09-02 09:09:17 +00:00
client: remove DnsPeerMgrDirtyFlags
This commit is contained in:
@@ -39,15 +39,10 @@ impl TryFrom<DnsExportConfig> for DnsPeerInfo {
|
||||
|
||||
const DNS_PEER_TTL: Duration = Duration::from_secs(3);
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct DnsPeerMgrDirtyFlags {
|
||||
pub(crate) peers: DirtyFlag,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deref)]
|
||||
pub struct DnsPeerMgr {
|
||||
peers: Cache<PeerId, DnsPeerInfo>,
|
||||
pub(super) dirty: DirtyState<DnsPeerMgrDirtyFlags>,
|
||||
pub(super) dirty: DirtyState<DirtyFlag>,
|
||||
|
||||
#[deref]
|
||||
mgr: Arc<PeerManager>,
|
||||
@@ -92,7 +87,7 @@ impl DnsPeerMgr {
|
||||
}
|
||||
};
|
||||
|
||||
self.dirty.peers.mark();
|
||||
self.dirty.mark();
|
||||
|
||||
match self.fetch(peer_id).await {
|
||||
Ok(info) => {
|
||||
|
||||
Reference in New Issue
Block a user