diff --git a/NEWS b/NEWS index 7804e0d20..3e48c90e6 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.21.18 (not yet released) * output - alsa: fix hang bug with ALSA "null" outputs +* storage + - curl: fix crash bug * reduce unnecessary CPU wakeups ver 0.21.17 (2019/12/16) diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx index b4e73ba0a..5417dae29 100644 --- a/src/storage/plugins/CurlStorage.cxx +++ b/src/storage/plugins/CurlStorage.cxx @@ -109,7 +109,9 @@ public: BIND_THIS_METHOD(OnDeferredStart)), request(curl, uri, *this) { // TODO: use CurlInputStream's configuration + } + void DeferStart() noexcept { /* start the transfer inside the IOThread */ defer_start.Schedule(); } @@ -283,6 +285,7 @@ public: } using BlockingHttpRequest::GetEasy; + using BlockingHttpRequest::DeferStart; using BlockingHttpRequest::Wait; protected: @@ -430,6 +433,7 @@ public: } const StorageFileInfo &Perform() { + DeferStart(); Wait(); return info; } @@ -481,6 +485,7 @@ public: base_path(UriPathOrSlash(uri)) {} std::unique_ptr Perform() { + DeferStart(); Wait(); return ToReader(); }