forked from lix-project/hydra
Don't wait forever to acquire the send lock
This commit is contained in:
parent
b405837d4d
commit
50ab80caf2
|
@ -229,7 +229,8 @@ void State::buildRemote(ref<Store> destStore,
|
|||
/* Copy the input closure. */
|
||||
if (/* machine->sshName != "localhost" */ true) {
|
||||
auto mc1 = std::make_shared<MaintainCount>(nrStepsWaiting);
|
||||
std::lock_guard<std::mutex> sendLock(machine->state->sendLock);
|
||||
std::unique_lock<std::timed_mutex> sendLock(
|
||||
machine->state->sendLock, std::chrono::seconds(600));
|
||||
mc1.reset();
|
||||
MaintainCount mc2(nrStepsCopyingTo);
|
||||
printMsg(lvlDebug, format("sending closure of ‘%1%’ to ‘%2%’") % step->drvPath % machine->sshName);
|
||||
|
|
|
@ -231,7 +231,7 @@ struct Machine
|
|||
|
||||
/* Mutex to prevent multiple threads from sending data to the
|
||||
same machine (which would be inefficient). */
|
||||
std::mutex sendLock;
|
||||
std::timed_mutex sendLock;
|
||||
};
|
||||
|
||||
State::ptr state;
|
||||
|
|
Loading…
Reference in a new issue