diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2016-12-05 18:28:03 -0500 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2016-12-06 13:55:51 -0500 |
commit | 81442db668a2a3aa50583ea8c54e5b84006ad565 (patch) | |
tree | 72a1ed4e2c1fab8a2ba01a8847ed6945b1250a6f /src/mongo/client/connpool.h | |
parent | 1f9513ef67551db6ea93b8b9e2f40604167f952b (diff) | |
download | mongo-81442db668a2a3aa50583ea8c54e5b84006ad565.tar.gz |
SERVER-26228 Change `PoolForHost` to use RAII.
The explicit management code is brittle, and can be replaced with
some simpler code and a default destructor.
Diffstat (limited to 'src/mongo/client/connpool.h')
-rw-r--r-- | src/mongo/client/connpool.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/client/connpool.h b/src/mongo/client/connpool.h index 2dbd104384a..683270d0021 100644 --- a/src/mongo/client/connpool.h +++ b/src/mongo/client/connpool.h @@ -139,11 +139,11 @@ public: private: struct StoredConnection { - StoredConnection(DBClientBase* c); + StoredConnection(std::unique_ptr<DBClientBase> c); bool ok(); - DBClientBase* conn; + std::unique_ptr<DBClientBase> conn; time_t when; }; |