File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ def handle_lazy_connect(self):
127127 # lazy_connect might have been set to False by another thread while waiting the lock
128128 # In this case, do nothing.
129129 if self .lazy_connect :
130- log .debug (format_log_context ("Lazy connect for connection " , connection = self .name ))
130+ log .debug (format_log_context ("Lazy connect enabled " , connection = self .name ))
131131 self .lazy_connect = False
132132 self .setup ()
133133
@@ -162,8 +162,11 @@ def unregister_connection(name):
162162 session = None
163163 log .warning ("Unregistering default connection '{0}'. Use set_default_connection to set a new one." .format (name ))
164164
165- log .debug ("Connection '{0}' has been removed from the registry." .format (name ))
165+ conn = _connections [name ]
166+ if conn .cluster :
167+ conn .cluster .shutdown ()
166168 del _connections [name ]
169+ log .debug ("Connection '{0}' has been removed from the registry." .format (name ))
167170
168171
169172def set_default_connection (name ):
You can’t perform that action at this time.
0 commit comments