mirror of
https://codeberg.org/icewind/taspromto.git
synced 2026-06-03 16:44:11 +02:00
tokio 1.0
This commit is contained in:
parent
777785ab76
commit
f2b0589cf6
4 changed files with 312 additions and 502 deletions
|
|
@ -12,8 +12,8 @@ use dashmap::DashMap;
|
|||
use pin_utils::pin_mut;
|
||||
use rumqttc::QoS;
|
||||
use std::sync::Arc;
|
||||
use tokio::stream::StreamExt;
|
||||
use tokio::time::Duration;
|
||||
use tokio_stream::StreamExt;
|
||||
use warp::Filter;
|
||||
|
||||
type DeviceStates = Arc<DashMap<Device, DeviceState>>;
|
||||
|
|
@ -38,7 +38,7 @@ async fn main() -> Result<()> {
|
|||
eprintln!("lost mqtt collection: {:#}", e);
|
||||
}
|
||||
eprintln!("reconnecting after 1s");
|
||||
tokio::time::delay_for(Duration::from_secs(1)).await;
|
||||
tokio::time::sleep(Duration::from_secs(1)).await;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue