From 4a8918364b247d0affaf60d70832657ff2b7c748 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 12 Feb 2022 22:16:14 +0100 Subject: [PATCH] Patch for issue-973 fix to make it work with libcurl --- src/tl/tl/tlHttpStreamCurl.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tl/tl/tlHttpStreamCurl.cc b/src/tl/tl/tlHttpStreamCurl.cc index 928db8832..452a45ef9 100644 --- a/src/tl/tl/tlHttpStreamCurl.cc +++ b/src/tl/tl/tlHttpStreamCurl.cc @@ -1334,7 +1334,9 @@ InputHttpStreamPrivateData::read (char *b, size_t n) tl::Clock start_time = tl::Clock::current (); while (n > m_connection->read_available () && ! m_connection->finished () && (m_timeout <= 0.0 || (tl::Clock::current() - start_time).seconds () < m_timeout) && ! tl::CurlNetworkManager::instance ()->has_reply ()) { mp_stream->tick (); - ++*m_progress; + if (m_progress.get ()) { // might have been reset by tick() + ++*m_progress; + } } }