summaryrefslogtreecommitdiff
path: root/src/mongo/client/dbclient_connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/client/dbclient_connection.cpp')
-rw-r--r--src/mongo/client/dbclient_connection.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/client/dbclient_connection.cpp b/src/mongo/client/dbclient_connection.cpp
index 9770437645b..48b7977992c 100644
--- a/src/mongo/client/dbclient_connection.cpp
+++ b/src/mongo/client/dbclient_connection.cpp
@@ -704,7 +704,7 @@ DBClientConnection::DBClientConnection(bool _autoReconnect,
void DBClientConnection::say(Message& toSend, bool isRetry, string* actualServer) {
checkConnection();
- auto killSessionOnError = makeGuard([this] { _markFailed(kEndSession); });
+ ScopeGuard killSessionOnError([this] { _markFailed(kEndSession); });
toSend.header().setId(nextMessageId());
toSend.header().setResponseToMsgId(0);
@@ -723,7 +723,7 @@ void DBClientConnection::say(Message& toSend, bool isRetry, string* actualServer
}
Status DBClientConnection::recv(Message& m, int lastRequestId) {
- auto killSessionOnError = makeGuard([this] { _markFailed(kEndSession); });
+ ScopeGuard killSessionOnError([this] { _markFailed(kEndSession); });
auto swm = _session->sourceMessage();
if (!swm.isOK()) {
return swm.getStatus();
@@ -747,7 +747,7 @@ bool DBClientConnection::call(Message& toSend,
bool assertOk,
string* actualServer) {
checkConnection();
- auto killSessionOnError = makeGuard([this] { _markFailed(kEndSession); });
+ ScopeGuard killSessionOnError([this] { _markFailed(kEndSession); });
auto maybeThrow = [&](const auto& errStatus) {
if (assertOk)
uassertStatusOKWithContext(errStatus,