mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
Fix deadlock in RemoteStore::queryPathInfoUncached()
This commit is contained in:
parent
7d21863bb3
commit
a4c1618876
1 changed files with 28 additions and 25 deletions
|
@ -297,6 +297,8 @@ void RemoteStore::queryPathInfoUncached(const Path & path,
|
|||
Callback<std::shared_ptr<ValidPathInfo>> callback)
|
||||
{
|
||||
try {
|
||||
std::shared_ptr<ValidPathInfo> info;
|
||||
{
|
||||
auto conn(connections->get());
|
||||
conn->to << wopQueryPathInfo << path;
|
||||
try {
|
||||
|
@ -311,7 +313,7 @@ void RemoteStore::queryPathInfoUncached(const Path & path,
|
|||
bool valid; conn->from >> valid;
|
||||
if (!valid) throw InvalidPath(format("path '%s' is not valid") % path);
|
||||
}
|
||||
auto info = std::make_shared<ValidPathInfo>();
|
||||
info = std::make_shared<ValidPathInfo>();
|
||||
info->path = path;
|
||||
info->deriver = readString(conn->from);
|
||||
if (info->deriver != "") assertStorePath(info->deriver);
|
||||
|
@ -323,6 +325,7 @@ void RemoteStore::queryPathInfoUncached(const Path & path,
|
|||
info->sigs = readStrings<StringSet>(conn->from);
|
||||
conn->from >> info->ca;
|
||||
}
|
||||
}
|
||||
callback(std::move(info));
|
||||
} catch (...) { callback.rethrow(); }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue