summaryrefslogtreecommitdiff
path: root/src/mongo/executor/connection_pool.h
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@10gen.com>2018-08-14 13:15:05 -0400
committerBen Caimano <ben.caimano@10gen.com>2018-08-14 18:50:13 -0400
commit5e0545d3625dc85d16f5f021896f61d3a21e2333 (patch)
treec6dea79887a4615870162e116fe540e25fa38305 /src/mongo/executor/connection_pool.h
parent96b6dd1e53997a3c57ffbec714f4239e9d20f6e0 (diff)
downloadmongo-5e0545d3625dc85d16f5f021896f61d3a21e2333.tar.gz
SERVER-36466 Secure shutdown conditions for SpecificPool
(cherry picked from commit 75b6218d33964aee5d68cf2553c95bafd8072d97)
Diffstat (limited to 'src/mongo/executor/connection_pool.h')
-rw-r--r--src/mongo/executor/connection_pool.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/mongo/executor/connection_pool.h b/src/mongo/executor/connection_pool.h
index a6539cf8beb..25f98fa63cd 100644
--- a/src/mongo/executor/connection_pool.h
+++ b/src/mongo/executor/connection_pool.h
@@ -63,11 +63,11 @@ class ConnectionPool : public EgressTagCloser {
class SpecificPool;
public:
- class ConnectionHandleDeleter;
class ConnectionInterface;
class DependentTypeFactoryInterface;
class TimerInterface;
+ using ConnectionHandleDeleter = stdx::function<void(ConnectionInterface* connection)>;
using ConnectionHandle = std::unique_ptr<ConnectionInterface, ConnectionHandleDeleter>;
using GetConnectionCallback = stdx::function<void(StatusWith<ConnectionHandle>)>;
@@ -172,20 +172,6 @@ private:
EgressTagCloserManager* _manager;
};
-class ConnectionPool::ConnectionHandleDeleter {
-public:
- ConnectionHandleDeleter() = default;
- ConnectionHandleDeleter(ConnectionPool* pool) : _pool(pool) {}
-
- void operator()(ConnectionInterface* connection) const {
- if (_pool && connection)
- _pool->returnConnection(connection);
- }
-
-private:
- ConnectionPool* _pool = nullptr;
-};
-
/**
* Interface for a basic timer
*