server: use errors.Is for error comparison

This commit is contained in:
Elle Mouton committed 2025-07-08 15:10:29 +02:00
1 parent 886ccd3f9b
commit 6295211d1a
1 file changed
+1 -1
+1 -1
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)
}