Merge pull request #6892 from Crypt-iQ/iss6882_notifywhenonline_fix

server.go: add peerChan to peerConnectedListeners in NotifyWhenOnline
This commit is contained in:
Oliver Gugger 2022-09-21 19:21:42 +02:00 committed by GitHub
commit beb897d6ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -6,6 +6,12 @@
(`POST /v1/graph/routes`)](https://github.com/lightningnetwork/lnd/pull/6926)
to make it possible to specify `route_hints` over REST.
## Bug Fixes
* [A bug where LND wouldn't send a ChannelUpdate during a channel open has
been fixed.](https://github.com/lightningnetwork/lnd/pull/6892)
# Contributors (Alphabetical Order)
* Eugene Siegel
* Oliver Gugger

View File

@ -3195,7 +3195,13 @@ func (s *server) NotifyWhenOnline(peerKey [33]byte,
select {
case <-peer.ActiveSignal():
case <-peer.QuitSignal():
// The peer quit so we'll just return.
// The peer quit, so we'll add the channel to the slice
// and return.
s.mu.Lock()
s.peerConnectedListeners[pubStr] = append(
s.peerConnectedListeners[pubStr], peerChan,
)
s.mu.Unlock()
return
}