aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/remote-store.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-04-05 03:51:45 +0200
committereldritch horrors <pennae@lix.systems>2024-04-05 20:13:02 +0000
commit821ad98beb1a915ea7a456c274bcfca9e059ba91 (patch)
tree8dc66cdeae3758eecd2515e568caf3783bd2ea56 /src/libstore/remote-store.cc
parent6c777476c9e97abfc5232f0707985caf6df2baea (diff)
Revert "libutil: drop Fs{Source,Sink}::good"
This reverts commit 1340807e30dba4b3972c31f02861bbaeaeb60e61. Change-Id: I34d2a80eb3c3e9d79cb02b92cd1189da32d18cb6
Diffstat (limited to 'src/libstore/remote-store.cc')
-rw-r--r--src/libstore/remote-store.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc
index 2ce047acd..2373bbdc7 100644
--- a/src/libstore/remote-store.cc
+++ b/src/libstore/remote-store.cc
@@ -39,7 +39,9 @@ RemoteStore::RemoteStore(const Params & params)
},
[this](const ref<Connection> & r) {
return
- std::chrono::duration_cast<std::chrono::seconds>(
+ r->to.good()
+ && r->from.good()
+ && std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::steady_clock::now() - r->startTime).count() < maxConnectionAge;
}
))
@@ -178,10 +180,6 @@ void RemoteStore::ConnectionHandle::processStderr(Sink * sink, Source * source,
m.find("Derive([") != std::string::npos)
throw Error("%s, this might be because the daemon is too old to understand dependencies on dynamic derivations. Check to see if the raw derivation is in the form '%s'", std::move(m), "DrvWithVersion(..)");
}
- // the daemon can still handle more requests, so the connection itself
- // is still valid. the current *handle* however should be considered a
- // lost cause and abandoned entirely.
- handle.release();
throw;
}
}