summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-08-19 21:18:59 +0200
committerMax Kellermann <max@musicpd.org>2020-03-26 17:22:10 +0100
commit8474599ed68e549f4863c86ed71f405146d98255 (patch)
treec333f47d0779746358b14bd3760560b1816a8e12 /src/lib
parentab39f64fc0131b4b7d9ebc7ad0d4bcab02d0cdc6 (diff)
lib/curl/Easy: add method Unpause()
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/curl/Easy.hxx4
-rw-r--r--src/lib/curl/Request.cxx2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/curl/Easy.hxx b/src/lib/curl/Easy.hxx
index 91de2b69e..83ddbd55f 100644
--- a/src/lib/curl/Easy.hxx
+++ b/src/lib/curl/Easy.hxx
@@ -162,6 +162,10 @@ public:
SetOption(CURLOPT_HTTPPOST, post);
}
+ bool Unpause() noexcept {
+ return ::curl_easy_pause(handle, CURLPAUSE_CONT) == CURLE_OK;
+ }
+
CurlString Escape(const char *string, int length=0) const noexcept {
return CurlString(curl_easy_escape(handle, string, length));
}
diff --git a/src/lib/curl/Request.cxx b/src/lib/curl/Request.cxx
index 326af6015..d36b83ef3 100644
--- a/src/lib/curl/Request.cxx
+++ b/src/lib/curl/Request.cxx
@@ -119,7 +119,7 @@ CurlRequest::Resume() noexcept
{
assert(registered);
- curl_easy_pause(easy.Get(), CURLPAUSE_CONT);
+ easy.Unpause();
global.InvalidateSockets();
}