mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 10:14:35 +00:00
bump version to v2.5.0 (#1715)
This commit is contained in:
@@ -225,7 +225,12 @@ fn get_or_create_worker(interface_name: &str) -> io::Result<Arc<InterfaceWorker>
|
||||
let interface = interfaces
|
||||
.into_iter()
|
||||
.find(|iface| iface.name == interface_name)
|
||||
.expect("Network interface not found");
|
||||
.ok_or_else(|| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::NotFound,
|
||||
format!("Network interface '{}' not found", interface_name),
|
||||
)
|
||||
})?;
|
||||
|
||||
let worker = InterfaceWorker::new(interface)?;
|
||||
INTERFACE_MANAGERS.insert(interface_name.to_string(), Arc::downgrade(&worker));
|
||||
|
||||
Reference in New Issue
Block a user