File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 88from . import tracing
99from . import iam
1010from . import _utilities
11+ from .coordination .client import CoordinationClient
12+
1113
1214
1315logger = logging .getLogger (__name__ )
@@ -248,7 +250,7 @@ def get_config(
248250
249251
250252class Driver (pool .ConnectionPool ):
251- __slots__ = ("scheme_client" , "table_client" )
253+ __slots__ = ("scheme_client" , "table_client" , "coordination_client" )
252254
253255 def __init__ (
254256 self ,
@@ -287,10 +289,16 @@ def __init__(
287289 self ._credentials = driver_config .credentials
288290
289291 self .scheme_client = scheme .SchemeClient (self )
292+ self .coordination_client = CoordinationClient (self )
290293 self .table_client = table .TableClient (self , driver_config .table_client_settings )
291294 self .topic_client = topic .TopicClient (self , driver_config .topic_client_settings )
292295
293296 def stop (self , timeout = 10 ):
294297 self .table_client ._stop_pool_if_needed (timeout = timeout )
295298 self .topic_client .close ()
299+ if hasattr (self , "coordination_client" ):
300+ try :
301+ self .coordination_client .close ()
302+ except Exception as e :
303+ logger .warning (f"Failed to close coordination client: { e } " )
296304 super ().stop (timeout = timeout )
You can’t perform that action at this time.
0 commit comments