Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/connection/grpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ export const grpcClient = (config: GrpcConnectionParams): GrpcClient => {
const channelOptions: ChannelOptions = {
'grpc.max_send_message_length': MAX_GRPC_MESSAGE_LENGTH,
'grpc.max_receive_message_length': MAX_GRPC_MESSAGE_LENGTH,
// Send keepalive pings every 10 seconds, default is 2 hours.
'grpc.keepalive_time_ms': 10 * 1000,
// Keepalive ping timeout after 5 seconds, default is 20 seconds.
'grpc.keepalive_timeout_ms': 5 * 1000,
// Allow keepalive pings when there are no gRPC calls.
'grpc.keepalive_permit_without_calls': 1,
};
if (config.grpcProxyUrl) {
// grpc.http_proxy is not used by grpc.js under-the-hood
Expand Down
Loading