mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-16 07:51:08 +02:00
In this commit, we fix an inadvertent memory leak by ensuring we always use `defer` to clean up the allocated objects/memory we use to be notified of new blocks to update what we send within the set of ping headers. A further optimization here would be using a single global block epoch housed within the server, that all peer `pingHandler` goroutines use directly. Fixes #6143.