diff --git a/lix/libstore/remote-store.cc b/lix/libstore/remote-store.cc index b52d469d0..9783bbf3f 100644 --- a/lix/libstore/remote-store.cc +++ b/lix/libstore/remote-store.cc @@ -56,29 +56,15 @@ RemoteStore::RemoteStore(const RemoteStoreConfig & config) kj::Promise>> RemoteStore::openConnectionWrapper() -try { - if (failed) - throw Error("opening a connection to remote store '%s' previously failed", getUri()); - try { - co_return TRY_AWAIT(openConnection()); - } catch (...) { - failed = true; - throw; - } -} catch (...) { - co_return result::current_exception(); +{ + return openConnection(); } kj::Promise>> RemoteStore::openAndInitConnection() try { auto conn = TRY_AWAIT(openConnection()); - try { - TRY_AWAIT(initConnection(*conn)); - co_return conn; - } catch (...) { - failed = true; - throw; - } + TRY_AWAIT(initConnection(*conn)); + co_return conn; } catch (...) { co_return result::current_exception(); } diff --git a/lix/libstore/remote-store.hh b/lix/libstore/remote-store.hh index 8353efb08..367f05145 100644 --- a/lix/libstore/remote-store.hh +++ b/lix/libstore/remote-store.hh @@ -206,9 +206,6 @@ protected: narFromPath(const StorePath & path, const Activity * context) override; private: - - std::atomic_bool failed{false}; - kj::Promise> copyDrvsFromEvalStore( const std::vector & paths, std::shared_ptr evalStore);