From 5c0ff0946bdd3d8c11983b3a742677731ce45428 Mon Sep 17 00:00:00 2001 From: HanQing Date: Sat, 20 Jul 2024 22:42:27 +0800 Subject: [PATCH] Modify Worker::connect to use the password in the URL, as Client::connect does. (#73) --- src/worker/builder.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/worker/builder.rs b/src/worker/builder.rs index 2a8d5eed..3c5d9aee 100644 --- a/src/worker/builder.rs +++ b/src/worker/builder.rs @@ -183,6 +183,7 @@ impl WorkerBuilder { ) -> Result, E>, Error> { let url = utils::parse_provided_or_from_env(url)?; let stream = TokioStream::connect(utils::host_from_url(&url)).await?; - self.connect_with(stream, None).await + self.connect_with(stream, url.password().map(|p| p.to_string())) + .await } }