MCPcopy Create free account
hub / github.com/Recordscript/recordscript / get_rendezvous_servers

Method get_rendezvous_servers

libs/hbb_common/src/config.rs:715–740  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

713 }
714
715 pub fn get_rendezvous_servers() -> Vec<String> {
716 let s = EXE_RENDEZVOUS_SERVER.read().unwrap().clone();
717 if !s.is_empty() {
718 return vec![s];
719 }
720 let s = Self::get_option("custom-rendezvous-server");
721 if !s.is_empty() {
722 return vec![s];
723 }
724 let s = PROD_RENDEZVOUS_SERVER.read().unwrap().clone();
725 if !s.is_empty() {
726 return vec![s];
727 }
728 let serial_obsolute = CONFIG2.read().unwrap().serial > SERIAL;
729 if serial_obsolute {
730 let ss: Vec<String> = Self::get_option("rendezvous-servers")
731 .split(',')
732 .filter(|x| x.contains('.'))
733 .map(|x| x.to_owned())
734 .collect();
735 if !ss.is_empty() {
736 return ss;
737 }
738 }
739 return RENDEZVOUS_SERVERS.iter().map(|x| x.to_string()).collect();
740 }
741
742 pub fn reset_online() {
743 *ONLINE.lock().unwrap() = Default::default();

Callers

nothing calls this directly

Calls 5

is_emptyMethod · 0.80
iterMethod · 0.80
to_stringMethod · 0.80
cloneMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected