mirror of
https://github.com/status-im/go-waku.git
synced 2025-02-26 20:10:44 +00:00
fix: increase response read limit (#169)
This commit is contained in:
parent
b728e62ec7
commit
a3125c7b61
@ -5,6 +5,7 @@ import (
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
"sync"
|
||||
|
||||
logging "github.com/ipfs/go-log"
|
||||
@ -95,7 +96,7 @@ func (wf *WakuFilter) onRequest(s network.Stream) {
|
||||
|
||||
filterRPCRequest := &pb.FilterRPC{}
|
||||
|
||||
reader := protoio.NewDelimitedReader(s, 64*1024)
|
||||
reader := protoio.NewDelimitedReader(s, math.MaxInt64)
|
||||
|
||||
err := reader.ReadMsg(filterRPCRequest)
|
||||
if err != nil {
|
||||
|
@ -5,6 +5,7 @@ import (
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
logging "github.com/ipfs/go-log"
|
||||
"github.com/libp2p/go-libp2p-core/host"
|
||||
@ -62,7 +63,7 @@ func (wakuLP *WakuLightPush) onRequest(s network.Stream) {
|
||||
requestPushRPC := &pb.PushRPC{}
|
||||
|
||||
writer := protoio.NewDelimitedWriter(s)
|
||||
reader := protoio.NewDelimitedReader(s, 64*1024)
|
||||
reader := protoio.NewDelimitedReader(s, math.MaxInt64)
|
||||
|
||||
err := reader.ReadMsg(requestPushRPC)
|
||||
if err != nil {
|
||||
@ -158,7 +159,7 @@ func (wakuLP *WakuLightPush) request(ctx context.Context, req *pb.PushRequest, o
|
||||
pushRequestRPC := &pb.PushRPC{RequestId: hex.EncodeToString(params.requestId), Query: req}
|
||||
|
||||
writer := protoio.NewDelimitedWriter(connOpt)
|
||||
reader := protoio.NewDelimitedReader(connOpt, 64*1024)
|
||||
reader := protoio.NewDelimitedReader(connOpt, math.MaxInt64)
|
||||
|
||||
err = writer.WriteMsg(pushRequestRPC)
|
||||
if err != nil {
|
||||
|
@ -343,7 +343,7 @@ func (store *WakuStore) onRequest(s network.Stream) {
|
||||
historyRPCRequest := &pb.HistoryRPC{}
|
||||
|
||||
writer := protoio.NewDelimitedWriter(s)
|
||||
reader := protoio.NewDelimitedReader(s, 64*1024)
|
||||
reader := protoio.NewDelimitedReader(s, math.MaxInt64)
|
||||
|
||||
err := reader.ReadMsg(historyRPCRequest)
|
||||
if err != nil {
|
||||
@ -510,7 +510,7 @@ func (store *WakuStore) queryFrom(ctx context.Context, q *pb.HistoryQuery, selec
|
||||
historyRequest := &pb.HistoryRPC{Query: q, RequestId: hex.EncodeToString(requestId)}
|
||||
|
||||
writer := protoio.NewDelimitedWriter(connOpt)
|
||||
reader := protoio.NewDelimitedReader(connOpt, 64*1024)
|
||||
reader := protoio.NewDelimitedReader(connOpt, math.MaxInt64)
|
||||
|
||||
err = writer.WriteMsg(historyRequest)
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user