fix: use max Int32 instead of 64 due to compile issue on android (#170)

This commit is contained in:
Richard Ramos 2021-11-25 10:18:33 -04:00 committed by GitHub
parent a3125c7b61
commit 23cbb24a94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -96,7 +96,7 @@ func (wf *WakuFilter) onRequest(s network.Stream) {
filterRPCRequest := &pb.FilterRPC{} filterRPCRequest := &pb.FilterRPC{}
reader := protoio.NewDelimitedReader(s, math.MaxInt64) reader := protoio.NewDelimitedReader(s, math.MaxInt32)
err := reader.ReadMsg(filterRPCRequest) err := reader.ReadMsg(filterRPCRequest)
if err != nil { if err != nil {

View File

@ -63,7 +63,7 @@ func (wakuLP *WakuLightPush) onRequest(s network.Stream) {
requestPushRPC := &pb.PushRPC{} requestPushRPC := &pb.PushRPC{}
writer := protoio.NewDelimitedWriter(s) writer := protoio.NewDelimitedWriter(s)
reader := protoio.NewDelimitedReader(s, math.MaxInt64) reader := protoio.NewDelimitedReader(s, math.MaxInt32)
err := reader.ReadMsg(requestPushRPC) err := reader.ReadMsg(requestPushRPC)
if err != nil { if err != nil {
@ -159,7 +159,7 @@ func (wakuLP *WakuLightPush) request(ctx context.Context, req *pb.PushRequest, o
pushRequestRPC := &pb.PushRPC{RequestId: hex.EncodeToString(params.requestId), Query: req} pushRequestRPC := &pb.PushRPC{RequestId: hex.EncodeToString(params.requestId), Query: req}
writer := protoio.NewDelimitedWriter(connOpt) writer := protoio.NewDelimitedWriter(connOpt)
reader := protoio.NewDelimitedReader(connOpt, math.MaxInt64) reader := protoio.NewDelimitedReader(connOpt, math.MaxInt32)
err = writer.WriteMsg(pushRequestRPC) err = writer.WriteMsg(pushRequestRPC)
if err != nil { if err != nil {

View File

@ -343,7 +343,7 @@ func (store *WakuStore) onRequest(s network.Stream) {
historyRPCRequest := &pb.HistoryRPC{} historyRPCRequest := &pb.HistoryRPC{}
writer := protoio.NewDelimitedWriter(s) writer := protoio.NewDelimitedWriter(s)
reader := protoio.NewDelimitedReader(s, math.MaxInt64) reader := protoio.NewDelimitedReader(s, math.MaxInt32)
err := reader.ReadMsg(historyRPCRequest) err := reader.ReadMsg(historyRPCRequest)
if err != nil { 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)} historyRequest := &pb.HistoryRPC{Query: q, RequestId: hex.EncodeToString(requestId)}
writer := protoio.NewDelimitedWriter(connOpt) writer := protoio.NewDelimitedWriter(connOpt)
reader := protoio.NewDelimitedReader(connOpt, math.MaxInt64) reader := protoio.NewDelimitedReader(connOpt, math.MaxInt32)
err = writer.WriteMsg(historyRequest) err = writer.WriteMsg(historyRequest)
if err != nil { if err != nil {