1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 05:52:20 +08:00

comments! and cleanup

This commit is contained in:
Jeromy
2015-03-15 11:13:59 -07:00
parent 0ee7091cbc
commit f679127d83
4 changed files with 70 additions and 18 deletions

View File

@ -296,13 +296,16 @@ func (n *IpfsNode) teardown() error {
n.Repo,
}
if n.Blocks != nil {
closers = append(closers, n.Blocks)
}
// Filesystem needs to be closed before network, dht, and blockservice
// so it can use them as its shutting down
if n.IpnsFs != nil {
closers = append(closers, n.IpnsFs)
}
if n.Blocks != nil {
closers = append(closers, n.Blocks)
}
if n.Bootstrapper != nil {
closers = append(closers, n.Bootstrapper)
}