From 64b33ee522375a8dc15be2875dfb7db4502259b0 Mon Sep 17 00:00:00 2001 From: Antonin Kral Date: Sat, 18 Jun 2011 21:24:41 +0200 Subject: Imported Upstream version 1.8.2 --- s/commands_public.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 's/commands_public.cpp') diff --git a/s/commands_public.cpp b/s/commands_public.cpp index 5b1ecaf..f29205b 100644 --- a/s/commands_public.cpp +++ b/s/commands_public.cpp @@ -545,6 +545,10 @@ namespace mongo { bool ok = conn->runCommand( conf->getName() , cmdObj , res ); conn.done(); + if (!ok && res.getIntField("code") == 9996) { // code for StaleConfigException + throw StaleConfigException(fullns, "FindAndModify"); // Command code traps this and re-runs + } + result.appendElements(res); return ok; } -- cgit v1.2.3