lib/mongo/retryable.rb in mongo-2.1.1 vs lib/mongo/retryable.rb in mongo-2.1.2
- old
+ new
@@ -50,10 +50,12 @@
if cluster.sharded? && e.retryable?
if attempt < cluster.max_read_retries
# We don't scan the cluster in this case as Mongos always returns
# ready after a ping no matter what the state behind it is.
sleep(cluster.read_retry_interval)
- read_with_retry(attempt - 1, &block)
+ read_with_retry(attempt + 1, &block)
+ else
+ raise e
end
else
raise e
end
end