mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
pp/ns clients: reuse connection + round robbin
This commit is contained in:
parent
68f1826db5
commit
21ed73bf42
2 changed files with 2 additions and 3 deletions
|
@ -76,7 +76,7 @@ func (s *service) doClient(ctx context.Context, fn func(cl nsp.DRPCAnynsClient)
|
|||
|
||||
// it will try to connect to the Naming Node
|
||||
// please enable "namingNode" type of node in the config (in the network.nodes array)
|
||||
peer, err := s.pool.Get(ctx, s.nodeconf.NamingNodePeers()[0])
|
||||
peer, err := s.pool.GetOneOf(ctx, s.nodeconf.NamingNodePeers())
|
||||
log.Info("trying to connect to namingNode peer: ", zap.Any("peer", peer))
|
||||
|
||||
if err != nil {
|
||||
|
|
|
@ -61,8 +61,7 @@ func (s *service) doClient(ctx context.Context, fn func(cl pp.DRPCAnyPaymentProc
|
|||
|
||||
// it will try to connect to the Payment Node
|
||||
// please use "paymentProcessingNode" type of node in the config (in the network.nodes array)
|
||||
peer, err := s.pool.Get(ctx, s.nodeconf.PaymentProcessingNodePeers()[0])
|
||||
|
||||
peer, err := s.pool.GetOneOf(ctx, s.nodeconf.PaymentProcessingNodePeers())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue