From 25c58c0a0028521e74f3d3a24c23b8a63ada2868 Mon Sep 17 00:00:00 2001 From: tycho garen Date: Tue, 22 Jun 2021 17:51:23 -0400 Subject: [PATCH] reduce pex sending buffer --- internal/p2p/pex/reactor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/p2p/pex/reactor.go b/internal/p2p/pex/reactor.go index 5058bf53f..6ce3dd06f 100644 --- a/internal/p2p/pex/reactor.go +++ b/internal/p2p/pex/reactor.go @@ -50,7 +50,7 @@ func ChannelDescriptor() conn.ChannelDescriptor { Priority: 1, SendQueueCapacity: 10, RecvMessageCapacity: maxMsgSize, - RecvBufferCapacity: 128, + RecvBufferCapacity: 32, MaxSendBytes: 200, } } @@ -416,6 +416,7 @@ func (r *ReactorV2) sendRequestForPeers() { // no peers are available r.Logger.Debug("no available peers to send request to, waiting...") r.nextRequestTime = time.Now().Add(noAvailablePeersWaitPeriod) + return } var peerID p2p.NodeID