diff options
Diffstat (limited to 'src/mongo/db/dbdirectclient.cpp')
-rw-r--r-- | src/mongo/db/dbdirectclient.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/dbdirectclient.cpp b/src/mongo/db/dbdirectclient.cpp index 3aee1750172..41b75377060 100644 --- a/src/mongo/db/dbdirectclient.cpp +++ b/src/mongo/db/dbdirectclient.cpp @@ -33,7 +33,6 @@ #include "mongo/db/client.h" #include "mongo/db/commands.h" #include "mongo/db/instance.h" -#include "mongo/db/lasterror.h" #include "mongo/db/operation_context.h" #include "mongo/util/log.h" @@ -123,7 +122,9 @@ namespace mongo { bool assertOk, string* actualServer) { DirectClientScope directClientScope(_txn); - LastError::get(_txn->getClient()).startRequest(); + if (lastError._get()) { + lastError.startRequest(toSend, lastError._get()); + } DbResponse dbResponse; assembleResponse(_txn, toSend, dbResponse, dummyHost); @@ -138,7 +139,9 @@ namespace mongo { void DBDirectClient::say(Message& toSend, bool isRetry, string* actualServer) { DirectClientScope directClientScope(_txn); - LastError::get(_txn->getClient()).startRequest(); + if (lastError._get()) { + lastError.startRequest(toSend, lastError._get()); + } DbResponse dbResponse; assembleResponse(_txn, toSend, dbResponse, dummyHost); |