File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -960,6 +960,9 @@ pub fn get_custom_rendezvous_server(custom: String) -> String {
960960
961961#[ inline]
962962pub fn get_api_server ( api : String , custom : String ) -> String {
963+ if Config :: no_register_device ( ) {
964+ return "" . to_owned ( ) ;
965+ }
963966 let mut res = get_api_server_ ( api, custom) ;
964967 if res. ends_with ( '/' ) {
965968 res. pop ( ) ;
Original file line number Diff line number Diff line change @@ -127,8 +127,7 @@ async fn start_hbbs_sync_async() {
127127 // Though the username comparison is only necessary on Windows,
128128 // we still keep the comparison on other platforms for consistency.
129129 let need_upload = ( !info_uploaded. uploaded || info_uploaded. username. as_ref( ) != Some ( & sys_username) ) &&
130- info_uploaded. last_uploaded. map( |x| x. elapsed( ) >= UPLOAD_SYSINFO_TIMEOUT ) . unwrap_or( true )
131- && !Config :: no_register_device( ) ;
130+ info_uploaded. last_uploaded. map( |x| x. elapsed( ) >= UPLOAD_SYSINFO_TIMEOUT ) . unwrap_or( true ) ;
132131 if need_upload {
133132 v[ "version" ] = json!( crate :: VERSION ) ;
134133 v[ "id" ] = json!( id) ;
You can’t perform that action at this time.
0 commit comments