diff --git a/mediarepo-api/Cargo.toml b/mediarepo-api/Cargo.toml index 4701a7f..755fafd 100644 --- a/mediarepo-api/Cargo.toml +++ b/mediarepo-api/Cargo.toml @@ -10,7 +10,7 @@ license = "gpl-3" tracing = "0.1.29" thiserror = "1.0.30" async-trait = {version = "0.1.51", optional=true} -rmp-ipc = {version = "0.9.2", optional=true} +rmp-ipc = {version = "0.10.0", optional=true} parking_lot = {version="0.11.2", optional=true} serde_json = {version="1.0.68", optional=true} directories = {version="4.0.1", optional=true} diff --git a/mediarepo-api/src/client_api/mod.rs b/mediarepo-api/src/client_api/mod.rs index 3360313..13de291 100644 --- a/mediarepo-api/src/client_api/mod.rs +++ b/mediarepo-api/src/client_api/mod.rs @@ -14,6 +14,7 @@ use rmp_ipc::ipc::stream_emitter::EmitMetadata; use rmp_ipc::payload::{EventReceivePayload, EventSendPayload}; use rmp_ipc::prelude::{AsyncProtocolStream, AsyncStreamProtocolListener}; use rmp_ipc::IPCBuilder; +use std::time::Duration; #[async_trait] pub trait IPCApi { @@ -82,6 +83,7 @@ where pub async fn connect(address: L::AddressType) -> ApiResult { let ctx = IPCBuilder::::new() .address(address) + .timeout(Duration::from_secs(10)) .build_pooled_client(8) .await?; let client = Self::new(ctx);