mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 09:06:15 +02:00
Cleanup
This commit is contained in:
parent
3a778ea8a0
commit
5176b072ed
1 changed files with 1 additions and 9 deletions
|
@ -725,16 +725,8 @@ ref<FileTransfer> getFileTransfer()
|
|||
{
|
||||
static ref<curlFileTransfer> fileTransfer = makeCurlFileTransfer();
|
||||
|
||||
// this has to be done in its own scope to make sure that the lock is released
|
||||
// before creating a new fileTransfer instance.
|
||||
auto needsRecreation = [&]() -> bool {
|
||||
auto state = fileTransfer->state_.lock();
|
||||
return state->quit;
|
||||
};
|
||||
|
||||
if (needsRecreation()) {
|
||||
if (fileTransfer->state_.lock()->quit)
|
||||
fileTransfer = makeCurlFileTransfer();
|
||||
}
|
||||
|
||||
return fileTransfer;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue