1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 22:01:15 +02:00

libstore/remote-store: avoid old-style casting for maxConnections

Type-checking works better this way as (type) style casting is too
permissive.
This commit is contained in:
Jörg Thalheim 2025-03-07 03:59:54 +01:00
parent 3b0b2fd8d6
commit 3b1e23af09

View file

@ -28,7 +28,7 @@ RemoteStore::RemoteStore(const Params & params)
: RemoteStoreConfig(params)
, Store(params)
, connections(make_ref<Pool<Connection>>(
std::max(1, (int) maxConnections),
std::max(1, maxConnections.get()),
[this]() {
auto conn = openConnectionWrapper();
try {