1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 03:23:16 +02:00

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.
This commit is contained in:
Eelco Dolstra 2017-03-03 19:05:50 +01:00
parent 7f62be1bcd
commit 577ebeaefb
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
7 changed files with 185 additions and 113 deletions

View file

@ -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;
}
};
}