ipv6 added debug

This commit is contained in:
alex 2026-06-12 09:25:29 +08:00
parent eb18e2edde
commit 2f11cef7d0
3 changed files with 6 additions and 2 deletions

2
Cargo.lock generated
View File

@ -2272,7 +2272,7 @@ dependencies = [
[[package]]
name = "punchnet"
version = "1.2.4"
version = "1.2.5"
dependencies = [
"ahash",
"arc-swap",

View File

@ -1,7 +1,9 @@
[package]
name = "punchnet"
version = "1.2.4"
version = "1.2.5"
edition = "2021"
license = "MIT"
description = "punchnet client"
[dependencies]
crc = "3.2.1"

View File

@ -16,8 +16,10 @@ use super::Node;
pub async fn run_ipv6(edge: &'static Node, mut v6_may_change: Receiver<bool>) {
v6_may_change.recv().await;
loop {
error!("v6_may_change received");
tokio::time::sleep(Duration::from_secs(1)).await;
let mut ipv6 = get_current_ipv6();
error!("got v6: {:?}", ipv6);
if ipv6.is_none() {
tokio::time::sleep(Duration::from_secs(5)).await;
ipv6 = get_current_ipv6();