Cleanups
This commit is contained in:
parent
ad5f62b9b9
commit
3067ad21d5
3 changed files with 19 additions and 18 deletions
|
|
@ -214,12 +214,16 @@ impl TorrentStateLive {
|
|||
paused: TorrentStatePaused,
|
||||
fatal_errors_tx: tokio::sync::oneshot::Sender<anyhow::Error>,
|
||||
cancellation_token: CancellationToken,
|
||||
session_stats: Arc<AtomicSessionStats>,
|
||||
) -> anyhow::Result<Arc<Self>> {
|
||||
let (peer_queue_tx, peer_queue_rx) = unbounded_channel();
|
||||
|
||||
let down_speed_estimator = SpeedEstimator::new(5);
|
||||
let up_speed_estimator = SpeedEstimator::new(5);
|
||||
let session = paused
|
||||
.info
|
||||
.session
|
||||
.upgrade()
|
||||
.context("session is dead, cannot start torrent")?;
|
||||
let session_stats = session.stats.atomic.clone();
|
||||
let down_speed_estimator = SpeedEstimator::default();
|
||||
let up_speed_estimator = SpeedEstimator::default();
|
||||
|
||||
let have_bytes = paused.chunk_tracker.get_hns().have_bytes;
|
||||
let lengths = *paused.chunk_tracker.get_lengths();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue