Skip to content

Commit

Permalink
fix: clean the peer snapshot map each time
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
  • Loading branch information
vincenzopalazzo committed Oct 5, 2022
1 parent 4bc6d4f commit 9f982ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/plugin/metrics_one.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func (instance *MetricOne) Migrate(payload map[string]any) error {
}

func (instance *MetricOne) snapshotListPeers(lightning *glightning.Lightning) error {
instance.PeerSnapshot = make(map[string]*glightning.Peer)
listPeers, err := lightning.ListPeers()
if err != nil {
log.GetInstance().Errorf("listpeer terminated with an error %s", err)
Expand Down

0 comments on commit 9f982ae

Please sign in to comment.