diff --git a/cassandra/connection.py b/cassandra/connection.py index 295066694..145e2ff25 100644 --- a/cassandra/connection.py +++ b/cassandra/connection.py @@ -1509,7 +1509,7 @@ def set_keyspace_blocking(self, keyspace): query = QueryMessage(query='USE "%s"' % (keyspace,), consistency_level=ConsistencyLevel.ONE) try: - result = self.wait_for_response(query) + result = self.wait_for_response(query, timeout=self.connect_timeout) except InvalidRequestException as ire: # the keyspace probably doesn't exist raise ire.to_exception()