libstore: don't wrap&unwrap connection handles

this was only necessary for old protocols we no longer support.

Change-Id: Iebb06ce6266c2c7c3f97da469b1295f4cb54ee5a
This commit is contained in:
eldritch horrors
2025-06-06 18:09:46 +02:00
parent b33669b55a
commit 2cd44d2e1d
+2 -4
View File
@@ -359,8 +359,7 @@ kj::Promise<Result<ref<const ValidPathInfo>>> RemoteStore::addCAToStore(
const StorePathSet & references,
RepairFlag repair)
try {
std::optional<ConnectionHandle> conn_(TRY_AWAIT(getConnection()));
auto & conn = *conn_;
auto conn(TRY_AWAIT(getConnection()));
conn->to
<< WorkerProto::Op::AddToStore
@@ -523,8 +522,7 @@ kj::Promise<Result<std::vector<KeyedBuildResult>>> RemoteStore::buildPathsWithRe
try {
TRY_AWAIT(copyDrvsFromEvalStore(paths, evalStore));
std::optional<ConnectionHandle> conn_(TRY_AWAIT(getConnection()));
auto & conn = *conn_;
auto conn(TRY_AWAIT(getConnection()));
conn->to << WorkerProto::Op::BuildPathsWithResults;
conn->to << WorkerProto::write(*this, *conn, paths);