From 91c473254ecb55a3e1ea3f23bfa65ed1d7ca4fe0 Mon Sep 17 00:00:00 2001 From: Matt Gabrenya Date: Thu, 5 Sep 2024 12:22:46 -0700 Subject: [PATCH] feat: pass a custom WebsocketConfig to connect for overriding default timeout --- src/admin_websocket.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/admin_websocket.rs b/src/admin_websocket.rs index b0f8e53..615674a 100644 --- a/src/admin_websocket.rs +++ b/src/admin_websocket.rs @@ -58,6 +58,11 @@ impl AdminWebsocket { /// As string `"localhost:30000"` /// As tuple `([127.0.0.1], 30000)` pub async fn connect(socket_addr: impl ToSocketAddrs) -> Result { + Self::connect_with_config(socket_addr, Arc::new(WebsocketConfig::CLIENT_DEFAULT)) + } + + /// Connect to a Conductor API AdminWebsocket with a custom WebsocketConfig. + pub async fn connect_with_config(socket_addr: impl ToSocketAddrs, config: Arc) -> Result { let addr = socket_addr .to_socket_addrs()? .next()