From 9b23ed84e5c4163fb4ee99a7a60490a5c6d613ee Mon Sep 17 00:00:00 2001 From: Jost Schulte Date: Tue, 10 Sep 2024 15:06:38 -0600 Subject: [PATCH] fix: actually use websocket config for connection --- src/admin_websocket.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/admin_websocket.rs b/src/admin_websocket.rs index cdaa5f7..cd66561 100644 --- a/src/admin_websocket.rs +++ b/src/admin_websocket.rs @@ -62,18 +62,16 @@ impl AdminWebsocket { } /// Connect to a Conductor API AdminWebsocket with a custom WebsocketConfig. - pub async fn connect_with_config(socket_addr: impl ToSocketAddrs, config: Arc) -> Result { + pub async fn connect_with_config( + socket_addr: impl ToSocketAddrs, + websocket_config: Arc, + ) -> Result { let addr = socket_addr .to_socket_addrs()? .next() .expect("invalid websocket address"); - let websocket_config = Arc::new(WebsocketConfig::CLIENT_DEFAULT); - let (tx, mut rx) = again::retry(|| { - let websocket_config = Arc::clone(&websocket_config); - connect(websocket_config, addr) - }) - .await?; + let (tx, mut rx) = again::retry(|| connect(websocket_config.clone(), addr)).await?; // WebsocketReceiver needs to be polled in order to receive responses // from remote to sender requests.