Merge tag 'v0.21.18'
release v0.21.18
This commit is contained in:
@@ -162,7 +162,6 @@ CurlGlobal::Remove(CurlRequest &r) noexcept
|
||||
assert(GetEventLoop().IsInside());
|
||||
|
||||
curl_multi_remove_handle(multi.Get(), r.Get());
|
||||
InvalidateSockets();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -220,12 +219,12 @@ CurlGlobal::UpdateTimeout(long timeout_ms) noexcept
|
||||
return;
|
||||
}
|
||||
|
||||
if (timeout_ms < 10)
|
||||
/* CURL 7.21.1 likes to report "timeout=0", which
|
||||
if (timeout_ms < 1)
|
||||
/* CURL's threaded resolver sets a timeout of 0ms, which
|
||||
means we're running in a busy loop. Quite a bad
|
||||
idea to waste so much CPU. Let's use a lower limit
|
||||
of 10ms. */
|
||||
timeout_ms = 10;
|
||||
of 1ms. */
|
||||
timeout_ms = 1;
|
||||
|
||||
timeout_event.Schedule(std::chrono::milliseconds(timeout_ms));
|
||||
}
|
||||
|
@@ -67,16 +67,6 @@ public:
|
||||
SocketAction(CURL_SOCKET_TIMEOUT, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a kludge to allow pausing/resuming a stream with
|
||||
* libcurl < 7.32.0. Read the curl_easy_pause manpage for
|
||||
* more information.
|
||||
*/
|
||||
void ResumeSockets() {
|
||||
int running_handles;
|
||||
curl_multi_socket_all(multi.Get(), &running_handles);
|
||||
}
|
||||
|
||||
private:
|
||||
/**
|
||||
* Check for finished HTTP responses.
|
||||
|
@@ -30,7 +30,6 @@
|
||||
#include "config.h"
|
||||
#include "Request.hxx"
|
||||
#include "Global.hxx"
|
||||
#include "Version.hxx"
|
||||
#include "Handler.hxx"
|
||||
#include "event/Call.hxx"
|
||||
#include "util/RuntimeError.hxx"
|
||||
@@ -122,12 +121,6 @@ CurlRequest::Resume() noexcept
|
||||
|
||||
easy.Unpause();
|
||||
|
||||
if (IsCurlOlderThan(0x072000))
|
||||
/* libcurl older than 7.32.0 does not update
|
||||
its sockets after curl_easy_pause(); force
|
||||
libcurl to do it now */
|
||||
global.ResumeSockets();
|
||||
|
||||
global.InvalidateSockets();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user