diff --git a/src/hydra-queue-runner/build-remote.cc b/src/hydra-queue-runner/build-remote.cc index b0b54ac58..f6dd5a351 100644 --- a/src/hydra-queue-runner/build-remote.cc +++ b/src/hydra-queue-runner/build-remote.cc @@ -117,13 +117,11 @@ static void copyClosureTo(std::timed_mutex & sendMutex, Store & destStore, garbage-collect paths that are already there. Optionally, ask the remote host to substitute missing paths. */ // FIXME: substitute output pollutes our build log - conn.to << cmdQueryValidPaths << 1 << useSubstitutes; - worker_proto::write(destStore, conn.to, closure); - conn.to.flush(); - /* Get back the set of paths that are already valid on the remote host. */ - auto present = worker_proto::read(destStore, conn.from, Phantom {}); + auto present = serve_proto::queryValidPaths( + conn, destStore, + true, closure, useSubstitutes); if (present.size() == closure.size()) return;