summaryrefslogtreecommitdiff
path: root/src/mongo/transport/transport_layer_asio.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2018-02-13 14:55:25 -0500
committerMathias Stearn <mathias@10gen.com>2018-03-09 08:30:48 -0500
commitfe15173edebdf0928694dcdb8637a1eb94b3a207 (patch)
tree7e931f2e4da181e55d39c58dbe50166e48517ccc /src/mongo/transport/transport_layer_asio.cpp
parent0c6771c252aff05afa4757c46378e5733028dbae (diff)
downloadmongo-fe15173edebdf0928694dcdb8637a1eb94b3a207.tar.gz
SERVER-33466 Futurize TransportLayerASIO implementation
Diffstat (limited to 'src/mongo/transport/transport_layer_asio.cpp')
-rw-r--r--src/mongo/transport/transport_layer_asio.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mongo/transport/transport_layer_asio.cpp b/src/mongo/transport/transport_layer_asio.cpp
index 1f5d45e053b..ff213b66b43 100644
--- a/src/mongo/transport/transport_layer_asio.cpp
+++ b/src/mongo/transport/transport_layer_asio.cpp
@@ -170,9 +170,7 @@ StatusWith<SessionHandle> TransportLayerASIO::connect(HostAndPort peer,
if (sslMode == kEnableSSL ||
(sslMode == kGlobalSSLMode && ((globalSSLMode == SSLParams::SSLMode_preferSSL) ||
(globalSSLMode == SSLParams::SSLMode_requireSSL)))) {
- Status sslStatus = Status::OK();
- auto onComplete = [&sslStatus](Status status) { sslStatus = status; };
- session->handshakeSSLForEgress(peer, std::move(onComplete));
+ auto sslStatus = session->handshakeSSLForEgress(peer).getNoThrow();
if (!sslStatus.isOK()) {
return sslStatus;
}