Skip to content

Commit

Permalink
Modify Worker::connect to use the password in the URL, as Client::con…
Browse files Browse the repository at this point in the history
…nect does. (#73)
  • Loading branch information
constlhq authored Jul 20, 2024
1 parent 159e840 commit 5c0ff09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/worker/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ impl<E: 'static> WorkerBuilder<E> {
) -> Result<Worker<BufStream<TokioStream>, 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
}
}

0 comments on commit 5c0ff09

Please sign in to comment.