Skip to content

Commit b0388f7

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 d27a332 commit b0388f7

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
@@ -4393,6 +4393,8 @@ def shutdown(self):
43934393
self.join()
43944394

43954395
def schedule(self, delay, fn, *args, **kwargs):
4396+
if self.is_shutdown:
4397+
return
43964398
if delay:
43974399
self._insert_task(delay, (fn, args, tuple(kwargs.items())))
43984400
else:

0 commit comments

Comments
 (0)