Bump tokio/warp versions

This commit is contained in:
Tangent Wantwight 2021-02-13 14:32:49 -05:00
parent 178309fb7d
commit 2c4753e1b9
3 changed files with 435 additions and 525 deletions

951
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -14,5 +14,5 @@ rust-embed = "5"
structopt = "0.3"
serde = {version = "1", features = ["derive"]}
serde_json = "1"
tokio = {version = "0.2", features = ["macros"]}
warp = "0.2"
tokio = {version = "^1.2", features = ["macros", "rt-multi-thread", "time"]}
warp = "0.3"

View File

@ -183,8 +183,9 @@ impl Server {
let server_handle = server_handle.clone();
let (task, abort_handle) = abortable(async move {
info!("Heartbeat task started");
let mut ticks = interval(TICK_LENGTH);
while let Some(tick) = ticks.next().await {
let mut clock = interval(TICK_LENGTH);
loop {
let tick = clock.tick().await;
server_handle.server.lock().await.tick(tick);
}
});