server: avoid logging error if no links are found
In this commit, we avoid logging an error when the links associated with a peer are not found within its termination watcher. We do this to prevent a benign log message as the links have already been removed from the switch.
This commit is contained in:
parent
33dda07b62
commit
16b412fb51
@ -2449,8 +2449,9 @@ func (s *server) peerTerminationWatcher(p *peer, ready chan struct{}) {
|
||||
//
|
||||
// TODO(roasbeef): instead add a PurgeInterfaceLinks function?
|
||||
links, err := p.server.htlcSwitch.GetLinksByInterface(p.pubKeyBytes)
|
||||
if err != nil {
|
||||
srvrLog.Errorf("unable to get channel links: %v", err)
|
||||
if err != nil && err != htlcswitch.ErrNoLinksFound {
|
||||
srvrLog.Errorf("Unable to get channel links for %x: %v",
|
||||
p.pubKeyBytes, err)
|
||||
}
|
||||
|
||||
for _, link := range links {
|
||||
|
Loading…
Reference in New Issue
Block a user