Skip to content

Commit

Permalink
fix(pubsublite): lower gRPC keepalive timeouts (#4378)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmdiep committed Jul 6, 2021
1 parent 16b006a commit 35d98c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pubsublite/internal/wire/rpc.go
Expand Up @@ -183,9 +183,11 @@ func isStreamResetSignal(err error) bool {
func defaultClientOptions(region string) []option.ClientOption {
return []option.ClientOption{
internaloption.WithDefaultEndpoint(region + pubsubLiteDefaultEndpoint),
// Keep inactive connections alive.
// Detect if transport is still alive if there is inactivity.
option.WithGRPCDialOption(grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: 5 * time.Minute,
Time: 1 * time.Minute,
Timeout: 1 * time.Minute,
PermitWithoutStream: true,
})),
}
}
Expand Down

0 comments on commit 35d98c8

Please sign in to comment.