From d66041a40af0d7511d3a693a662efebe5529bea5 Mon Sep 17 00:00:00 2001 From: Jason Carey Date: Mon, 7 May 2018 13:18:05 -0400 Subject: SERVER-34473 Re-separate (in/eg)ress net counters After unifying under Transport Layer ASIO, we're counting ingress and egress bytes sent/received under counters that were formerly only ingress. This restores the old behavior. --- src/mongo/transport/transport_layer_asio.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mongo/transport/transport_layer_asio.cpp') diff --git a/src/mongo/transport/transport_layer_asio.cpp b/src/mongo/transport/transport_layer_asio.cpp index 92d6678c73c..87750d6b506 100644 --- a/src/mongo/transport/transport_layer_asio.cpp +++ b/src/mongo/transport/transport_layer_asio.cpp @@ -459,7 +459,7 @@ StatusWith TransportLayerASIO::_doSyncCon sock.non_blocking(false); try { - return std::make_shared(this, std::move(sock)); + return std::make_shared(this, std::move(sock), false); } catch (const DBException& e) { return e.toStatus(); } @@ -507,7 +507,8 @@ Future TransportLayerASIO::asyncConnect(HostAndPort peer, return connector->socket.async_connect(results->endpoint(), UseFuture{}); }) .then([this, connector, sslMode]() { - connector->session = std::make_shared(this, std::move(connector->socket)); + connector->session = + std::make_shared(this, std::move(connector->socket), false); connector->session->ensureAsync(); #ifndef MONGO_CONFIG_SSL if (sslMode == kEnableSSL) { @@ -753,7 +754,8 @@ void TransportLayerASIO::_acceptConnection(GenericAcceptor& acceptor) { } try { - std::shared_ptr session(new ASIOSession(this, std::move(peerSocket))); + std::shared_ptr session( + new ASIOSession(this, std::move(peerSocket), true)); _sep->startSession(std::move(session)); } catch (const DBException& e) { warning() << "Error accepting new connection " << e; -- cgit v1.2.1