Skip to content

Commit d1967db

Browse files
committed
by default, don't convict a host based on heartbeat timeouts
PYTHON-286
1 parent 604b691 commit d1967db

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cassandra/policies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from random import randint
1818
from threading import Lock
1919

20-
from cassandra import ConsistencyLevel
20+
from cassandra import ConsistencyLevel, OperationTimedOut
2121

2222
log = logging.getLogger(__name__)
2323

@@ -465,7 +465,7 @@ class SimpleConvictionPolicy(ConvictionPolicy):
465465
"""
466466

467467
def add_failure(self, connection_exc):
468-
return True
468+
return not isinstance(connection_exc, OperationTimedOut)
469469

470470
def reset(self):
471471
pass

0 commit comments

Comments
 (0)