Skip to content

Commit

Permalink
clear peer_endpoint on metrics update
Browse files Browse the repository at this point in the history
fixes stalled wireguard_peer_endpoint metrics on peer IP change for the same publickey
  • Loading branch information
furmur committed May 7, 2024
1 parent 7d2d768 commit 226065e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ impl Metrics {
btr.inc_by(diff);
}

self.peer_endpoint.reset();

for p in &state.peers {
assert!(p.interface < state.interfaces.len());

Expand Down

0 comments on commit 226065e

Please sign in to comment.