From 5428a5ef7993155ebd6d291f3ed473819b589560 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowak Date: Fri, 24 Mar 2023 09:41:29 +0100 Subject: [PATCH] Make receive size bigger --- collector/collector.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/collector/collector.go b/collector/collector.go index 18fd8a6..aba23ff 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -2,9 +2,10 @@ package collector import ( "context" - "google.golang.org/grpc/credentials/insecure" "time" + "google.golang.org/grpc/credentials/insecure" + pb "github.com/spacemeshos/api/release/go/spacemesh/v1" "google.golang.org/grpc" @@ -63,7 +64,8 @@ func (c *Collector) Run() { log.Info("dial node %v", c.apiUrl) c.connecting = true - conn, err := grpc.Dial(c.apiUrl, grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.Dial(c.apiUrl, grpc.WithTransportCredentials(insecure.NewCredentials()), + grpc.WithBlock(), grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(50*1024*1024))) if err != nil { log.Error("cannot dial node: %v", err) time.Sleep(1 * time.Second)