refact: optimize, loading recent peers (#10847)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-02-20 11:53:36 +08:00
committed by GitHub
parent 2e89a33210
commit 055b351164
8 changed files with 265 additions and 139 deletions

View File

@@ -169,6 +169,8 @@ pub fn core_main() -> Option<Vec<String>> {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
init_plugins(&args);
if args.is_empty() || crate::common::is_empty_uni_link(&args[0]) {
#[cfg(windows)]
hbb_common::config::PeerConfig::preload_peers();
std::thread::spawn(move || crate::start_server(false, no_server));
} else {
#[cfg(windows)]