We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 577746a commit 4f540b1Copy full SHA for 4f540b1
1 file changed
libs/server-sent-events/src/curl_client.hpp
@@ -94,8 +94,11 @@ class CurlClient final : public Client,
94
std::chrono::steady_clock::time_point last_progress_time;
95
curl_off_t last_download_amount;
96
97
- // These are thread-safe, because they are only accessed from
98
- // CurlClient's strand after construction.
+ // Mutated on the strand in do_run() before each transfer, and read by
+ // libcurl via raw pointers (CURLOPT_URL, CURLOPT_POSTFIELDS) for the
99
+ // duration of the transfer. Safe because the next do_run() only fires
100
+ // after the previous transfer's completion callback, so reads and
101
+ // writes never overlap.
102
http::request<http::string_body> req;
103
std::string url;
104
std::optional<std::chrono::milliseconds> const connect_timeout;
0 commit comments