diff options
Diffstat (limited to 's/commands_public.cpp')
-rw-r--r-- | s/commands_public.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |