Fix spawn local panic about local set

This commit is contained in:
Kaan Barmore-Genç 2022-06-09 22:11:42 -04:00
parent a9629ad4a3
commit 05a3fb6c89
No known key found for this signature in database
GPG key ID: 362529CF3A326F16
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View file

@ -270,7 +270,7 @@ dependencies = [
[[package]] [[package]]
name = "gandi-live-dns" name = "gandi-live-dns"
version = "1.1.0" version = "1.2.1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "gandi-live-dns" name = "gandi-live-dns"
version = "1.2.0" version = "1.2.1"
edition = "2021" edition = "2021"
authors = ["Kaan Barmore-Genç <kaan@bgenc.net>"] authors = ["Kaan Barmore-Genç <kaan@bgenc.net>"]

View file

@ -96,7 +96,7 @@ async fn main() -> anyhow::Result<()> {
}; };
let req = client.put(url).json(&payload); let req = client.put(url).json(&payload);
let task_governor = governor.clone(); let task_governor = governor.clone();
let task = tokio::task::spawn_local(async move { let task = tokio::task::spawn(async move {
task_governor.until_ready_with_jitter(retry_jitter).await; task_governor.until_ready_with_jitter(retry_jitter).await;
println!("Updating {}", &fqdn); println!("Updating {}", &fqdn);
match req.send().await { match req.send().await {