File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -146,13 +146,10 @@ impl Index {
146146 . add ( & original_info_hash, & torrent, & metadata, user_id)
147147 . await ?;
148148
149- // Secondary task: import torrent statistics from the tracker
149+ // Synchronous secondary tasks
150150
151- drop (
152- self . tracker_statistics_importer
153- . import_torrent_statistics ( torrent_id, & torrent. canonical_info_hash_hex ( ) )
154- . await ,
155- ) ;
151+ self . import_torrent_statistics_from_tracker ( torrent_id, & torrent. canonical_info_hash ( ) )
152+ . await ;
156153
157154 // Secondary task: whitelist torrent on the tracker
158155
@@ -239,6 +236,14 @@ impl Index {
239236 torrent. reset_announce_list_if_private ( ) ;
240237 }
241238
239+ async fn import_torrent_statistics_from_tracker ( & self , torrent_id : TorrentId , canonical_info_hash : & InfoHash ) {
240+ drop (
241+ self . tracker_statistics_importer
242+ . import_torrent_statistics ( torrent_id, & canonical_info_hash. to_hex_string ( ) )
243+ . await ,
244+ ) ;
245+ }
246+
242247 /// Gets a torrent from the Index.
243248 ///
244249 /// # Errors
You can’t perform that action at this time.
0 commit comments