Browse Source

Reconnect after each complete ts download iteration.

main
Georg Hopp 11 months ago
parent
commit
3228be45b1
Signed by: ghopp GPG Key ID: 4C5D226768784538
  1. 10
      src/m3u8_download.rs
  2. 2
      src/main.rs

10
src/m3u8_download.rs

@ -148,11 +148,6 @@ impl M3u8Download {
break
} else {
info!("All {} tasks wait for unavailable service", waits.len());
if self.do_reconnect {
info!("reconnect http connections");
client.reconnect().await;
}
let pause_time = waits
. into_iter()
. fold(self.time_wait, |a, w| w.min(a));
@ -162,6 +157,11 @@ impl M3u8Download {
} else {
join_all(non_waits).await;
}
if self.do_reconnect {
info!("reconnect http connections");
client.reconnect().await;
}
}
}

2
src/main.rs

@ -52,7 +52,7 @@ struct Args {
use_body_timeout: bool,
#[arg( short = 'R'
, default_value_t = false
, help = "prevent reconnect before wait" )]
, help = "prevent reconnect after each iteration" )]
prevent_reconnect: bool,
#[arg( short
, default_value_t = 301

Loading…
Cancel
Save