mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-17 06:04:20 +01:00
server: defer ticker stop to avoid goroutine leak
This commit is contained in:
@@ -3819,6 +3819,7 @@ func (s *server) connectToPersistentPeer(pubKeyStr string) {
|
|||||||
// creation of the connection requests for those.
|
// creation of the connection requests for those.
|
||||||
go func() {
|
go func() {
|
||||||
ticker := time.NewTicker(multiAddrConnectionStagger)
|
ticker := time.NewTicker(multiAddrConnectionStagger)
|
||||||
|
defer ticker.Stop()
|
||||||
|
|
||||||
for _, addr := range addrMap {
|
for _, addr := range addrMap {
|
||||||
// Send the persistent connection request to the
|
// Send the persistent connection request to the
|
||||||
|
|||||||
Reference in New Issue
Block a user