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:
parent
ab8322da47
commit
fc292e4a12
2 changed files with 8 additions and 9 deletions
|
@ -26,7 +26,6 @@ import (
|
||||||
"github.com/anyproto/any-sync/commonspace/sync/objectsync/objectmessages"
|
"github.com/anyproto/any-sync/commonspace/sync/objectsync/objectmessages"
|
||||||
"github.com/anyproto/any-sync/commonspace/syncstatus"
|
"github.com/anyproto/any-sync/commonspace/syncstatus"
|
||||||
"github.com/anyproto/any-sync/net/peer"
|
"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/net/streampool"
|
||||||
"github.com/anyproto/any-sync/util/crypto"
|
"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 {
|
func (s *space) HandleStream(stream spacesyncproto.DRPCSpaceSync_ObjectSyncStreamStream) error {
|
||||||
protoVersion, err := peer.CtxProtoVersion(stream.Context())
|
//protoVersion, err := peer.CtxProtoVersion(stream.Context())
|
||||||
if err != nil {
|
//if err != nil {
|
||||||
return err
|
// return err
|
||||||
}
|
//}
|
||||||
if protoVersion < secureservice.ProtoVersion {
|
//if protoVersion < secureservice.ProtoVersion {
|
||||||
return spacesyncproto.ErrUnexpected
|
// return spacesyncproto.ErrUnexpected
|
||||||
}
|
//}
|
||||||
return s.streamPool.ReadStream(stream)
|
return s.streamPool.ReadStream(stream)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
compatibleVersions = []uint32{NewSyncCompatibleVersion, ProtoVersion}
|
compatibleVersions = []uint32{2, ProtoVersion}
|
||||||
)
|
)
|
||||||
|
|
||||||
func New() SecureService {
|
func New() SecureService {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue