1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 02:21:16 +02:00

Merge pull request #13027 from NixOS/mergify/bp/2.28-maintenance/pr-12603

libstore: curl retry: reset content-encoding and don't use string after move (backport #12603)
This commit is contained in:
Jörg Thalheim 2025-04-15 14:00:13 +02:00 committed by GitHub
commit f233a99cc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,10 +22,8 @@
#include <curl/curl.h>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iostream>
#include <queue>
#include <random>
#include <thread>
@ -525,6 +523,8 @@ struct curlFileTransfer : public FileTransfer
warn("%s; retrying from offset %d in %d ms", exc.what(), writtenToSink, ms);
else
warn("%s; retrying in %d ms", exc.what(), ms);
decompressionSink.reset();
errorSink.reset();
embargo = std::chrono::steady_clock::now() + std::chrono::milliseconds(ms);
fileTransfer.enqueueItem(shared_from_this());
}