Skip to content

Commit 92d2e86

Browse files
authored
feat(client): Enable gRPC keep-alive by default (#855)
1 parent e9c976e commit 92d2e86

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/client/src/connection.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ export function defaultConnectionOpts(): ConnectionOptionsWithDefaults {
7979
return {
8080
address: LOCAL_TARGET,
8181
credentials: grpc.credentials.createInsecure(),
82-
channelArgs: {},
82+
channelArgs: {
83+
'grpc.keepalive_permit_without_calls': 1,
84+
'grpc.keepalive_time_ms': 30_000,
85+
'grpc.keepalive_timeout_ms': 15_000,
86+
},
8387
interceptors: [makeGrpcRetryInterceptor(defaultGrpcRetryOptions())],
8488
metadata: {},
8589
connectTimeoutMs: 10_000,

0 commit comments

Comments
 (0)