Commit 99071601 authored by nanahira's avatar nanahira

fix

parent d4fdd8b5
Pipeline #37142 passed with stages
in 2 minutes and 12 seconds
......@@ -125,8 +125,9 @@ impl<'a> Router<'a> {
Self::run_up_script(&config)?;
let mut endpoints_set = HashSet::new();
if let Some(addr) = *endpoint.read().unwrap() {
endpoints_set.insert(addr);
let ep_guard = endpoint.read().unwrap();
if let Some(addr) = ep_guard.as_ref() {
endpoints_set.insert(*addr); // SockAddr 实现了 Copy
}
let endpoints = Arc::new(RwLock::new(endpoints_set));
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