mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00
[NOD-1222] Turn on gzip in gRPC. (#850)
This commit is contained in:
parent
b92943a98c
commit
420c3d4258
@ -3,6 +3,7 @@ package grpcserver
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"google.golang.org/grpc/encoding/gzip"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
@ -87,7 +88,7 @@ func (s *gRPCServer) Connect(address string) (server.Connection, error) {
|
||||
}
|
||||
|
||||
client := protowire.NewP2PClient(gRPCConnection)
|
||||
stream, err := client.MessageStream(context.Background())
|
||||
stream, err := client.MessageStream(context.Background(), grpc.UseCompressor(gzip.Name))
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "error getting client stream for %s", address)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user