From b4c59d2c7a836634f2bc6eb763590a7914901cd5 Mon Sep 17 00:00:00 2001 From: rakshasa Date: Sat, 7 Jun 2025 12:59:11 +0200 Subject: [PATCH] Fixed corrupted stack in curl stack due to wrong argument type. --- src/core/curl_stack.cc | 4 ++-- src/core/curl_stack.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/curl_stack.cc b/src/core/curl_stack.cc index 992931a7..13407948 100644 --- a/src/core/curl_stack.cc +++ b/src/core/curl_stack.cc @@ -233,10 +233,10 @@ CurlStack::global_cleanup() { // TODO: Is this function supposed to set a per-handle timeout, or is // it the shortest timeout amongst all handles? int -CurlStack::set_timeout([[maybe_unused]] void* handle, std::chrono::microseconds timeout, void* userp) { +CurlStack::set_timeout(void*, long timeout_ms, void* userp) { CurlStack* stack = (CurlStack*)userp; - torrent::this_thread::scheduler()->update_wait_for_ceil_seconds(&stack->m_task_timeout, timeout); + torrent::this_thread::scheduler()->update_wait_for_ceil_seconds(&stack->m_task_timeout, std::chrono::milliseconds(timeout_ms)); return 0; } diff --git a/src/core/curl_stack.h b/src/core/curl_stack.h index 71c96675..cc897cd9 100644 --- a/src/core/curl_stack.h +++ b/src/core/curl_stack.h @@ -79,7 +79,7 @@ public: void receive_action(CurlSocket* socket, int type); - static int set_timeout(void* handle, std::chrono::microseconds timeout, void* userp); + static int set_timeout(void*, long timeout_ms, void* userp); void transfer_done(void* handle, const char* msg);