mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
HttpBinaryCacheStore::getFile(): Fix uncaught exception
This method is marked as `noexcept`, but `enqueueFileTransfer()` can
throw `Interrupted` if the user has hit Ctrl-C or if the `ThreadPool`
that the thread is a part of is shutting down.
(cherry picked from commit 4566854981
)
This commit is contained in:
parent
b23812a59c
commit
15a2b49115
1 changed files with 19 additions and 18 deletions
|
@ -169,10 +169,6 @@ protected:
|
|||
{
|
||||
try {
|
||||
checkEnabled();
|
||||
} catch (...) {
|
||||
callback.rethrow();
|
||||
return;
|
||||
}
|
||||
|
||||
auto request(makeRequest(path));
|
||||
|
||||
|
@ -191,6 +187,11 @@ protected:
|
|||
callbackPtr->rethrow();
|
||||
}
|
||||
}});
|
||||
|
||||
} catch (...) {
|
||||
callback.rethrow();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue