autopilot: fix nil map assignment

Use the `clear` call to reset a map on `reset` instead of assigning nil
to the entry.
This commit is contained in:
Elle Mouton
2025-09-18 07:37:53 +02:00
parent 1ee3b95f6d
commit a5cf958c2c
3 changed files with 4 additions and 4 deletions

View File

@@ -249,7 +249,7 @@ func (c *ChannelGraphBootstrapper) SampleNodeAddrs(_ context.Context,
return errFound
}, func() {
a = nil
clear(a)
})
if err != nil && !errors.Is(err, errFound) {
return nil, err