mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-12-24 23:09:25 -05:00
fix cli
This commit is contained in:
parent
bbf97a535a
commit
46504e44b8
@ -1,11 +1,10 @@
|
||||
use crate::client_api_connection::*;
|
||||
use crate::settings::Settings;
|
||||
use crate::ui::*;
|
||||
use log::*;
|
||||
use std::cell::*;
|
||||
use std::net::SocketAddr;
|
||||
use std::rc::Rc;
|
||||
use std::time::{Duration, SystemTime};
|
||||
use std::time::SystemTime;
|
||||
use veilid_core::tools::*;
|
||||
use veilid_core::*;
|
||||
|
||||
@ -365,7 +364,7 @@ reply - reply to an AppCall not handled directly by the server
|
||||
debug!("Connection lost, retrying in 2 seconds");
|
||||
{
|
||||
let waker = self.inner_mut().connection_waker.instance_clone(());
|
||||
let _ = timeout(Duration::from_millis(2000), waker).await;
|
||||
let _ = timeout(2000, waker).await;
|
||||
}
|
||||
self.inner_mut().connection_waker.reset();
|
||||
first = false;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#![deny(unused_must_use)]
|
||||
#![recursion_limit = "256"]
|
||||
|
||||
use crate::tools::*;
|
||||
use veilid_core::tools::*;
|
||||
|
||||
use clap::{Arg, ColorChoice, Command};
|
||||
|
@ -3,22 +3,12 @@ use core::future::Future;
|
||||
|
||||
cfg_if! {
|
||||
if #[cfg(feature="rt-async-std")] {
|
||||
pub use async_std::task::JoinHandle;
|
||||
pub use async_std::net::TcpStream;
|
||||
pub use async_std::future::TimeoutError;
|
||||
|
||||
pub use async_std::task::sleep;
|
||||
pub use async_std::future::timeout;
|
||||
pub fn block_on<F: Future<Output = T>, T>(f: F) -> T {
|
||||
async_std::task::block_on(f)
|
||||
}
|
||||
} else if #[cfg(feature="rt-tokio")] {
|
||||
pub use tokio::task::JoinHandle;
|
||||
pub use tokio::net::TcpStream;
|
||||
pub use tokio::time::error::Elapsed as TimeoutError;
|
||||
|
||||
pub use tokio::time::sleep;
|
||||
pub use tokio::time::timeout;
|
||||
pub fn block_on<F: Future<Output = T>, T>(f: F) -> T {
|
||||
let rt = tokio::runtime::Runtime::new().unwrap();
|
||||
let local = tokio::task::LocalSet::new();
|
||||
|
Loading…
Reference in New Issue
Block a user