1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

Remove proto version code

This commit is contained in:
mcrakhman 2024-07-04 17:23:08 +02:00
parent ab8322da47
commit fc292e4a12
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
2 changed files with 8 additions and 9 deletions

View file

@ -26,7 +26,6 @@ import (
"github.com/anyproto/any-sync/commonspace/sync/objectsync/objectmessages"
"github.com/anyproto/any-sync/commonspace/syncstatus"
"github.com/anyproto/any-sync/net/peer"
"github.com/anyproto/any-sync/net/secureservice"
"github.com/anyproto/any-sync/net/streampool"
"github.com/anyproto/any-sync/util/crypto"
)
@ -150,13 +149,13 @@ func (s *space) DeleteTree(ctx context.Context, id string) (err error) {
}
func (s *space) HandleStream(stream spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream) error {
protoVersion, err := peer.CtxProtoVersion(stream.Context())
if err != nil {
return err
}
if protoVersion < secureservice.ProtoVersion {
return spacesyncproto.ErrUnexpected
}
//protoVersion, err := peer.CtxProtoVersion(stream.Context())
//if err != nil {
// return err
//}
//if protoVersion < secureservice.ProtoVersion {
// return spacesyncproto.ErrUnexpected
//}
return s.streamPool.ReadStream(stream)
}

View file

@ -34,7 +34,7 @@ var (
)
var (
compatibleVersions = []uint32{NewSyncCompatibleVersion, ProtoVersion}
compatibleVersions = []uint32{2, ProtoVersion}
)
func New() SecureService {