Skip to content

Commit e0801f5

Browse files
committed
discovery: use errors.Is for error check
Ensure that the check works for wrapped errors. Otherwise, this breaks for a SQLStore graph backend which wraps the error it returns.
1 parent 3493b08 commit e0801f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discovery/bootstrapper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func (c *ChannelGraphBootstrapper) SampleNodeAddrs(_ context.Context,
236236

237237
return errFound
238238
})
239-
if err != nil && err != errFound {
239+
if err != nil && !errors.Is(err, errFound) {
240240
return nil, err
241241
}
242242

0 commit comments

Comments
 (0)