Closed peerlessDJ closed 3 months ago
TorrentManager torrentManager = await _clientEngine.AddAsync(pArgs.Torrent, pArgs.SavePath); foreach (var file in torrentManager.Files) { var torrentItem = pArgs.TorrentItems.FirstOrDefault(item => item.TorrentFile.Path == file.Path); await torrentManager.SetFilePriorityAsync(file, torrentItem != null ? (Priority)torrentItem.Priority : Priority.DoNotDownload); } torrentManager.TorrentStateChanged += delegate (object o, TorrentStateChangedEventArgs e) { Debug.WriteLine($"TorrentStateChanged----OldState: [{e.OldState}] NewState: [{e.NewState}] DateTime:[{DateTime.Now.ToString()}]"); }; await torrentManager.StartAsync();
The log is
TorrentStateChanged----OldState: [Stopped] NewState: [Starting] DateTime:[2024/8/9 15:03:18] TorrentStateChanged----OldState: [Starting] NewState: [Hashing] DateTime:[2024/8/9 15:03:18] TorrentStateChanged----OldState: [Hashing] NewState: [FetchingHashes] DateTime:[2024/8/9 15:03:18] TorrentStateChanged----OldState: [FetchingHashes] NewState: [Downloading] DateTime:[2024/8/9 15:05:28]
from FetchingHashes to Downloading wait 2 minutes
Ah - I think I see the issue.
There's a bug whereby hash request messages are enqueued to send to a peer, but the never begins processing, and so the requests are left there until the timeout is reached.
The log is
from FetchingHashes to Downloading wait 2 minutes