mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-10 18:10:54 +09:00
Fix sync tree close
This commit is contained in:
parent
c16812df55
commit
8ad16df17f
1 changed files with 8 additions and 3 deletions
|
@ -4,9 +4,13 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/anyproto/any-sync/commonspace/deletionmanager"
|
||||
"github.com/anyproto/any-sync/util/crypto"
|
||||
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/anyproto/any-sync/accountservice"
|
||||
"github.com/anyproto/any-sync/app/logger"
|
||||
"github.com/anyproto/any-sync/commonspace/object/tree/objecttree"
|
||||
|
@ -18,8 +22,6 @@ import (
|
|||
"github.com/anyproto/any-sync/commonspace/spacestorage"
|
||||
"github.com/anyproto/any-sync/commonspace/spacesyncproto"
|
||||
"github.com/anyproto/any-sync/nodeconf"
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
var log = logger.NewNamed("common.commonspace.settings")
|
||||
|
@ -166,7 +168,10 @@ func (s *settingsObject) checkHistoryState(ctx context.Context) (err error) {
|
|||
}
|
||||
|
||||
func (s *settingsObject) Close() error {
|
||||
return s.SyncTree.Close()
|
||||
if s.SyncTree != nil {
|
||||
return s.SyncTree.Close()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var isDerivedRoot = objecttree.IsDerivedRoot
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue