File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1201,6 +1201,7 @@ class ControlConnection(object):
12011201
12021202 # for testing purposes
12031203 _time = time
1204+ _is_shutdown = False
12041205
12051206 def __init__ (self , cluster ):
12061207 # use a weak reference to allow the Cluster instance to be GC'ed (and
@@ -1217,8 +1218,6 @@ def __init__(self, cluster):
12171218 self ._reconnection_handler = None
12181219 self ._reconnection_lock = RLock ()
12191220
1220- self ._is_shutdown = False
1221-
12221221 def connect (self ):
12231222 if self ._is_shutdown :
12241223 return
@@ -1490,6 +1489,9 @@ def wait_for_schema_agreement(self, connection=None):
14901489 # a lock is just a simple way to cut down on the number of schema queries
14911490 # we'll make.
14921491 with self ._schema_agreement_lock :
1492+ if self ._is_shutdown :
1493+ return
1494+
14931495 log .debug ("[control connection] Waiting for schema agreement" )
14941496 if not connection :
14951497 connection = self ._connection
You can’t perform that action at this time.
0 commit comments