server: use errors.Is for error comparison

This commit is contained in:
Elle Mouton
2025-07-07 09:13:34 +02:00
parent 886ccd3f9b
commit 6295211d1a

View File

@@ -3604,7 +3604,7 @@ func (s *server) establishPersistentConnections() error {
// attempt to connect to based on our set of previous connections. Set
// the reconnection port to the default peer port.
linkNodes, err := s.chanStateDB.LinkNodeDB().FetchAllLinkNodes()
if err != nil && err != channeldb.ErrLinkNodesNotFound {
if err != nil && !errors.Is(err, channeldb.ErrLinkNodesNotFound) {
return fmt.Errorf("failed to fetch all link nodes: %w", err)
}