1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-10 18:10:54 +09:00

Return back empty derived tree check

This commit is contained in:
mcrakhman 2024-08-05 20:11:31 +02:00
parent fdc190c70f
commit 417baabeee
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B

View file

@ -289,6 +289,9 @@ func (s *syncTree) checkAlive() (err error) {
func (s *syncTree) SyncWithPeer(ctx context.Context, p peer.Peer) (err error) {
s.Lock()
defer s.Unlock()
if objecttree.IsEmptyDerivedTree(s.ObjectTree) {
return
}
protoVersion, err := peer.CtxProtoVersion(p.Context())
// this works with old protocol
if err != nil || protoVersion <= secureservice.ProtoVersion {