mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Update connections on space level
This commit is contained in:
parent
248205cddd
commit
b85f545fa3
4 changed files with 19 additions and 4 deletions
|
@ -28,6 +28,7 @@ import (
|
|||
"github.com/anyproto/any-sync/net/pool"
|
||||
"github.com/anyproto/any-sync/net/rpc/rpcerr"
|
||||
"github.com/anyproto/any-sync/nodeconf"
|
||||
"storj.io/drpc"
|
||||
"sync/atomic"
|
||||
)
|
||||
|
||||
|
@ -222,8 +223,12 @@ func (s *spaceService) getSpaceStorageFromRemote(ctx context.Context, id string)
|
|||
return
|
||||
}
|
||||
|
||||
cl := spacesyncproto.NewDRPCSpaceSyncClient(p)
|
||||
res, err := cl.SpacePull(ctx, &spacesyncproto.SpacePullRequest{Id: id})
|
||||
var res *spacesyncproto.SpacePullResponse
|
||||
err = p.DoDrpc(ctx, func(conn drpc.Conn) error {
|
||||
cl := spacesyncproto.NewDRPCSpaceSyncClient(conn)
|
||||
res, err = cl.SpacePull(ctx, &spacesyncproto.SpacePullRequest{Id: id})
|
||||
return err
|
||||
})
|
||||
if err != nil {
|
||||
err = rpcerr.Unwrap(err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue