Skip to content

Commit

Permalink
chore: update keepalive settings for topic client (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
anitarua committed Jan 2, 2024
1 parent c88060c commit 50e54a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/internal/topics_grpc_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ class TopicGrpcManager {
final _logger = Logger('MomentoTopicClient');

TopicGrpcManager(CredentialProvider credentialProvider) {
_channel = ClientChannel(credentialProvider.cacheEndpoint);
_channel = ClientChannel(credentialProvider.cacheEndpoint,
options: ChannelOptions(
keepAlive: ClientKeepAliveOptions(
pingInterval: Duration(seconds: 10),
timeout: Duration(seconds: 5))));
_client = PubsubClient(_channel,
options: CallOptions(metadata: {
'authorization': credentialProvider.apiKey,
Expand Down

0 comments on commit 50e54a9

Please sign in to comment.