refactor: tr_web (#2640)

* fixup! refactor: tr_web (#2633)

fix: race condition in web threadfunc during bootstrap

fixes #2639
This commit is contained in:
Charles Kerr
2022-02-17 17:35:57 -06:00
committed by GitHub
parent 33cb3b0a73
commit 29af76d977
9 changed files with 84 additions and 95 deletions

View File

@@ -124,7 +124,7 @@ static char* tr_strlratio(char* buf, double ratio, size_t buflen)
static bool waitingOnWeb;
static void onTorrentFileDownloaded(tr_web::FetchResponse&& response)
static void onTorrentFileDownloaded(tr_web::FetchResponse const& response)
{
auto* ctor = static_cast<tr_ctor*>(response.user_data);
tr_ctorSetMetainfo(ctor, std::data(response.body), std::size(response.body), nullptr);