Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
hrzlgnm committed Oct 30, 2024
1 parent d8383e7 commit 9c2dc7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions shared_constants/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::time::Duration;
pub const MDNS_SD_META_SERVICE: &str = "_services._dns-sd._udp.local.";
pub const METRICS_CHECK_INTERVAL: Duration = Duration::from_secs(1);
pub const META_SERVICE: &str = "_services._dns-sd._udp.local.";
pub const SPLASH_SCREEN_DURATION: Duration = Duration::from_secs(2);
pub const AUTO_COMPLETE_AUTO_FOCUS_DELAY: Duration = Duration::from_secs(3);
pub const AUTO_COMPLETE_AUTO_FOCUS_DELAY: Duration = Duration::from_secs(5);
pub const SHOW_NO_UPDATE_DURATION: Duration = Duration::from_secs(3);
6 changes: 3 additions & 3 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use serde::Serialize;

#[cfg(not(debug_assertions))]
use shared_constants::SPLASH_SCREEN_DURATION;
use shared_constants::{META_SERVICE, METRICS_CHECK_INTERVAL};
use shared_constants::{MDNS_SD_META_SERVICE, METRICS_CHECK_INTERVAL};
use std::{
collections::HashMap,
net::IpAddr,
Expand Down Expand Up @@ -153,7 +153,7 @@ fn browse_types(window: Window, state: State<ManagedState>) {
let mdns_for_thread = mdns.clone();
std::thread::spawn(move || {
let receiver = mdns_for_thread
.browse(META_SERVICE)
.browse(MDNS_SD_META_SERVICE)
.expect("Failed to browse");
while let Ok(event) = receiver.recv() {
match event {
Expand All @@ -180,7 +180,7 @@ fn browse_types(window: Window, state: State<ManagedState>) {
.expect("To emit");
}
ServiceEvent::SearchStopped(service_type) => {
if service_type == META_SERVICE {
if service_type == MDNS_SD_META_SERVICE {
break;
}
}
Expand Down

0 comments on commit 9c2dc7d

Please sign in to comment.