Skip to content

Commit cf60a7a

Browse files
committed
Revert "PYTHON-2728 Disable loadBalanced feature flag"
This reverts commit 07d2d8e.
1 parent d40e649 commit cf60a7a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pymongo/client_options.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def _parse_pool_options(options):
130130
options.get('compressors', []),
131131
options.get('zlibcompressionlevel', -1))
132132
ssl_context, ssl_match_hostname = _parse_ssl_options(options)
133+
load_balanced = options.get('loadbalanced')
133134
return PoolOptions(max_pool_size,
134135
min_pool_size,
135136
max_idle_time_seconds,
@@ -141,7 +142,7 @@ def _parse_pool_options(options):
141142
driver,
142143
compression_settings,
143144
server_api=server_api,
144-
load_balanced=None)
145+
load_balanced=load_balanced)
145146

146147

147148
class ClientOptions(object):
@@ -174,7 +175,7 @@ def __init__(self, username, password, database, options):
174175
self.__server_selector = options.get(
175176
'server_selector', any_server_selector)
176177
self.__auto_encryption_opts = options.get('auto_encryption_opts')
177-
self.__load_balanced = None
178+
self.__load_balanced = options.get('loadbalanced')
178179

179180
@property
180181
def _options(self):

0 commit comments

Comments
 (0)