internal void QueueFlush(TorrentManager manager, int index)
{
IOLoop.Queue(() =>
{
try
{
foreach (var file in manager.Torrent.Files.Where(file => file.StartPieceIndex >= index && file.EndPieceIndex <= index))
_writer.Flush(file);
}
catch (Exception ex)
{
SetError(manager, Reason.WriteFailure, ex);
}
});
}