Skip to content

Commit cbf3474

Browse files
authored
Fix for intermittent hang (#70)
* Test fix for intermittent hang * Fix validation error
1 parent 41aa4fa commit cbf3474

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/coherence/client.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,10 +1212,16 @@ def __init__(self, session_options: Optional[Options] = None):
12121212

12131213
self._tasks: Set[Task[None]] = set()
12141214

1215+
options: Sequence[tuple[str, Any]] = [
1216+
("grpc.min_reconnect_backoff_ms", 1100),
1217+
("grpc.max_reconnect_backoff_ms", 3000),
1218+
("grpc.lb_policy_name", "round_robin"),
1219+
]
1220+
12151221
if self._session_options.tls_options is None:
12161222
self._channel: grpc.aio.Channel = grpc.aio.insecure_channel(
12171223
self._session_options.address,
1218-
options=None
1224+
options=options
12191225
if self._session_options.channel_options is None
12201226
else self._session_options.channel_options,
12211227
interceptors=interceptors,
@@ -1225,7 +1231,7 @@ def __init__(self, session_options: Optional[Options] = None):
12251231
self._channel = grpc.aio.secure_channel(
12261232
self._session_options.address,
12271233
creds,
1228-
options=None
1234+
options=options
12291235
if self._session_options.channel_options is None
12301236
else self._session_options.channel_options,
12311237
interceptors=interceptors,

0 commit comments

Comments
 (0)