diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-03-03 19:05:50 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-03-03 19:05:50 +0100 |
commit | 577ebeaefb71020f0d6b79488602fd56ba2c1863 (patch) | |
tree | cffee660e5d378419d4e15a5269095666e42640e /src/libutil | |
parent | 7f62be1bcd2a228076a6c39eb435ad1931bb66e4 (diff) |
Improve SSH handling
* Unify SSH code in SSHStore and LegacySSHStore.
* Fix a race starting the SSH master. We now wait synchronously for
the SSH master to finish starting. This prevents the SSH clients
from starting their own connections.
* Don't use a master if max-connections == 1.
* Add a "max-connections" store parameter.
* Add a "compress" store parameter.
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/pool.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libutil/pool.hh b/src/libutil/pool.hh index f291cd578..3c3dd4b07 100644 --- a/src/libutil/pool.hh +++ b/src/libutil/pool.hh @@ -141,11 +141,16 @@ public: } } - unsigned int count() + size_t count() { auto state_(state.lock()); return state_->idle.size() + state_->inUse; } + + size_t capacity() + { + return state.lock()->max; + } }; } |