1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 08:43:27 +00:00

fix: tr_torrentStat() acquires a session thread lock (#4571)

This commit is contained in:
Charles Kerr 2023-01-10 09:05:31 -06:00 committed by GitHub
parent e4625cec0b
commit e4b480ecd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1522,6 +1522,7 @@ tr_stat const* tr_torrentStat(tr_torrent* tor)
using namespace stat_helpers;
TR_ASSERT(tr_isTorrent(tor));
auto const lock = tor->unique_lock();
auto const now = tr_time_msec();
auto const now_sec = tr_time();