[client] Refresh WireGuard stats in mobile debug bundles

The iOS and Android DebugBundle paths built GeneratorDependencies without
setting RefreshStatus, so the bundle's status.txt read the cached peer
state instead of live WireGuard interface stats. When the periodic health
probe had not run yet, connected relayed peers showed "handshake: -" and
"0 B/0 B" even though the interface was passing traffic.

Wire RefreshStatus to RunHealthProbes on both platforms, matching the
desktop daemon path in client/server/debug.go. The engine reference is
already available in the cc.Engine() block used for client metrics.
This commit is contained in:
Zoltán Papp
2026-07-17 13:56:26 +02:00
parent 21fc5b81f6
commit 17ae3a91ea
2 changed files with 6 additions and 0 deletions

View File

@@ -247,6 +247,9 @@ func (c *Client) DebugBundle(platformFiles PlatformFiles, anonymize bool) (strin
deps.SyncResponse = resp
if e := cc.Engine(); e != nil {
deps.RefreshStatus = func() {
e.RunHealthProbes(context.Background(), true)
}
if cm := e.GetClientMetrics(); cm != nil {
deps.ClientMetrics = cm
}

View File

@@ -233,6 +233,9 @@ func (c *Client) DebugBundle(anonymize bool) (string, error) {
deps.SyncResponse = resp
if e := cc.Engine(); e != nil {
deps.RefreshStatus = func() {
e.RunHealthProbes(context.Background(), true)
}
if cm := e.GetClientMetrics(); cm != nil {
deps.ClientMetrics = cm
}