mirror of
https://github.com/fosrl/newt.git
synced 2026-03-27 04:56:41 +00:00
fix(main): remove duplicate ClearTunnelID/State and call telemetry.UpdateSiteInfo after resolving client ID
This commit is contained in:
8
main.go
8
main.go
@@ -469,6 +469,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
endpoint = client.GetConfig().Endpoint // Update endpoint from config
|
endpoint = client.GetConfig().Endpoint // Update endpoint from config
|
||||||
id = client.GetConfig().ID // Update ID 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
|
// output env var values if set
|
||||||
logger.Debug("Endpoint: %v", endpoint)
|
logger.Debug("Endpoint: %v", endpoint)
|
||||||
@@ -740,12 +742,6 @@ persistent_keepalive_interval=5`, fixKey(privateKey.String()), fixKey(wgData.Pub
|
|||||||
state.Global().ClearTunnel(wgData.PublicKey)
|
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
|
// Mark as disconnected
|
||||||
connected = false
|
connected = false
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user