Skip to content

Commit

Permalink
registry: make sure registry recorder is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Feb 13, 2024
1 parent 682de09 commit 17d282e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/hostd/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (n *node) Close() error {
n.rhp3.Close()
n.rhp2.Close()
n.data.Close()
n.registry.Close()
n.storage.Close()
n.contracts.Close()
n.w.Close()
Expand Down
6 changes: 5 additions & 1 deletion host/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ func NewManager(privkey types.PrivateKey, store Store, log *zap.Logger) *Manager
log: log.Named("recorder"),
},
}
go m.recorder.Run(m.tg.Done())
done, _ := m.tg.Add()
go func() {
m.recorder.Run(m.tg.Done())
done()
}()
return m
}
1 change: 1 addition & 0 deletions internal/test/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func (h *Host) Close() error {
h.settings.Close()
h.wallet.Close()
h.contracts.Close()
h.registry.Close()
h.storage.Close()
h.store.Close()
h.Node.Close()
Expand Down

0 comments on commit 17d282e

Please sign in to comment.