Bump tokio/warp versions
This commit is contained in:
parent
178309fb7d
commit
2c4753e1b9
3 changed files with 435 additions and 525 deletions
951
Cargo.lock
generated
951
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -14,5 +14,5 @@ rust-embed = "5"
|
||||||
structopt = "0.3"
|
structopt = "0.3"
|
||||||
serde = {version = "1", features = ["derive"]}
|
serde = {version = "1", features = ["derive"]}
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
tokio = {version = "0.2", features = ["macros"]}
|
tokio = {version = "^1.2", features = ["macros", "rt-multi-thread", "time"]}
|
||||||
warp = "0.2"
|
warp = "0.3"
|
||||||
|
|
|
@ -183,8 +183,9 @@ impl Server {
|
||||||
let server_handle = server_handle.clone();
|
let server_handle = server_handle.clone();
|
||||||
let (task, abort_handle) = abortable(async move {
|
let (task, abort_handle) = abortable(async move {
|
||||||
info!("Heartbeat task started");
|
info!("Heartbeat task started");
|
||||||
let mut ticks = interval(TICK_LENGTH);
|
let mut clock = interval(TICK_LENGTH);
|
||||||
while let Some(tick) = ticks.next().await {
|
loop {
|
||||||
|
let tick = clock.tick().await;
|
||||||
server_handle.server.lock().await.tick(tick);
|
server_handle.server.lock().await.tick(tick);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue