diff --git a/lix/libstore/remote-store-connection.hh b/lix/libstore/remote-store-connection.hh index 8c730b014..9d16fe9e0 100644 --- a/lix/libstore/remote-store-connection.hh +++ b/lix/libstore/remote-store-connection.hh @@ -161,7 +161,9 @@ struct RemoteStore::ConnectionHandle // and serialize all *preceding* arguments normally before handing over to // the subframing layer (which is then responsible for any error handling) if constexpr (requires { *handle->to << std::declval(); }) { - ((*handle->to << std::forward(args)), ...); + StringSink msg; + ((msg << std::forward(args)), ...); + StringSource{msg.s}.drainInto(*handle->to); handle->to->flush(); LIX_TRY_AWAIT(processStderr()); } else { @@ -169,10 +171,12 @@ struct RemoteStore::ConnectionHandle AllArgsT allArgs(std::forward(args)...); [&](std::integer_sequence) { - ((*handle->to << std::forward>( + StringSink msg; + ((msg << std::forward>( std::get(allArgs) )), ...); + StringSource{msg.s}.drainInto(*handle->to); handle->to->flush(); }(ImmediateArgsIdxs{});