Fix app not displayed when click on the dock icon under macOS (#424)

This commit is contained in:
fanyang
2024-10-14 21:33:48 +08:00
committed by GitHub
parent 949003ee1b
commit 70708b34cc
5 changed files with 38 additions and 21 deletions

View File

@@ -56,8 +56,10 @@ impl HostResolverIter {
self.ips = ips
.filter(|x| x.is_ipv4())
.choose_multiple(&mut rand::thread_rng(), self.max_ip_per_domain as usize);
if self.ips.is_empty() {return self.next().await;}
if self.ips.is_empty() {
return self.next().await;
}
}
Err(e) => {
tracing::warn!(?host, ?e, "lookup host for stun failed");

View File

@@ -69,10 +69,14 @@ impl<'d> TxToken for BufferTxToken<'d> {
}
impl Device for BufferDevice {
type RxToken<'a> = BufferRxToken
where Self:'a;
type TxToken<'a> = BufferTxToken<'a>
where Self:'a;
type RxToken<'a>
= BufferRxToken
where
Self: 'a;
type TxToken<'a>
= BufferTxToken<'a>
where
Self: 'a;
fn receive(&mut self, _timestamp: Instant) -> Option<(Self::RxToken<'_>, Self::TxToken<'_>)> {
match self.recv_queue.pop_front() {

View File

@@ -137,7 +137,6 @@ impl EasyTierLauncher {
let vpn_portal = instance.get_vpn_portal_inst();
tasks.spawn(async move {
loop {
// Update TUN Device Name
*data_c.tun_dev_name.write().unwrap() = global_ctx_c.get_flags().dev_name.clone();