Commit e09df344 authored by nanahira's avatar nanahira

Revert "fix"

This reverts commit 99071601.
parent 99071601
...@@ -125,9 +125,8 @@ impl<'a> Router<'a> { ...@@ -125,9 +125,8 @@ impl<'a> Router<'a> {
Self::run_up_script(&config)?; Self::run_up_script(&config)?;
let mut endpoints_set = HashSet::new(); let mut endpoints_set = HashSet::new();
let ep_guard = endpoint.read().unwrap(); if let Some(addr) = *endpoint.read().unwrap() {
if let Some(addr) = ep_guard.as_ref() { endpoints_set.insert(addr);
endpoints_set.insert(*addr); // SockAddr 实现了 Copy
} }
let endpoints = Arc::new(RwLock::new(endpoints_set)); let endpoints = Arc::new(RwLock::new(endpoints_set));
let last_seen = Arc::new(RwLock::new(Instant::now())); let last_seen = Arc::new(RwLock::new(Instant::now()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment