fix(main): remove duplicate ClearTunnelID/State and call telemetry.UpdateSiteInfo after resolving client ID

Former-commit-id: 09fcb369633f3b3e69ba666514c8477aa7d8cd4d
This commit is contained in:
Marc Schäfer
2025-10-08 00:09:44 +02:00
parent cbc7931bc4
commit f9b824d227
+2 -6
View File
@@ -469,6 +469,8 @@ func main() {
}
endpoint = client.GetConfig().Endpoint // Update endpoint from config
id = client.GetConfig().ID // Update ID from config
// Update site labels for metrics with the resolved ID
telemetry.UpdateSiteInfo(id, region)
// output env var values if set
logger.Debug("Endpoint: %v", endpoint)
@@ -740,12 +742,6 @@ persistent_keepalive_interval=5`, fixKey(privateKey.String()), fixKey(wgData.Pub
state.Global().ClearTunnel(wgData.PublicKey)
}
// Clear metrics attrs and sessions for the tunnel
if pm != nil {
pm.ClearTunnelID()
state.Global().ClearTunnel(wgData.PublicKey)
}
// Mark as disconnected
connected = false