summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/isself_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/isself_test.cpp')
-rw-r--r--src/mongo/db/repl/isself_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/repl/isself_test.cpp b/src/mongo/db/repl/isself_test.cpp
index d06b512aab9..fcc9f59aede 100644
--- a/src/mongo/db/repl/isself_test.cpp
+++ b/src/mongo/db/repl/isself_test.cpp
@@ -50,7 +50,7 @@ TEST_F(ServiceContextTest, DetectsSameHostIPv4) {
#if defined(_WIN32) || defined(__linux__) || defined(__APPLE__)
bool wasEnabled = IPv6Enabled();
enableIPv6(false);
- ON_BLOCK_EXIT(enableIPv6, wasEnabled);
+ ON_BLOCK_EXIT([&] { enableIPv6(wasEnabled); });
// first we get the addrs bound on this host
const std::vector<std::string> addrs = getBoundAddrs(false);
// Fastpath should agree with the result of getBoundAddrs
@@ -67,7 +67,7 @@ TEST_F(ServiceContextTest, DetectsSameHostIPv6) {
#if defined(_WIN32) || defined(__linux__) || defined(__APPLE__)
bool wasEnabled = IPv6Enabled();
enableIPv6(true);
- ON_BLOCK_EXIT(enableIPv6, wasEnabled);
+ ON_BLOCK_EXIT([&] { enableIPv6(wasEnabled); });
// first we get the addrs bound on this host
const std::vector<std::string> addrs = getBoundAddrs(true);
// Fastpath should agree with the result of getBoundAddrs