Skip to content

Commit b1e8eee

Browse files
committed
Make _Scheduler that has been shutdown ignore schedule requests
There is no reason to accept schedule requests when cluster is shutting down.
1 parent 28785ec commit b1e8eee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cassandra/cluster.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4456,6 +4456,8 @@ def shutdown(self):
44564456
self.join()
44574457

44584458
def schedule(self, delay, fn, *args, **kwargs):
4459+
if self.is_shutdown:
4460+
return
44594461
if delay:
44604462
self._insert_task(delay, (fn, args, tuple(kwargs.items())))
44614463
else:

0 commit comments

Comments
 (0)