Handle failure to submit request after preparing

After re-preparing an unrecognized prepared statement, the
prepared statement will be resubmitted.  The submission process
was not being checked for failures, which could leave the ResponseFuture
hanging endlessly.
This commit is contained in:
Tyler Hobbs
2013-10-31 14:05:20 -05:00
parent f2592b0d0b
commit 40b3a5346e

View File

@@ -1867,7 +1867,10 @@ class ResponseFuture(object):
if response.kind == ResultMessage.KIND_PREPARED:
# use self._query to re-use the same host and
# at the same time properly borrow the connection
self._query(self._current_host)
request_id = self._query(self._current_host)
if request_id is None:
# this host errored out, move on to the next
self.send_request()
else:
self._set_final_exception(ConnectionException(
"Got unexpected response when preparing statement "