rename fn

This commit is contained in:
Conrad Ludgate
2024-08-16 08:54:25 +01:00
parent 484cdccbf2
commit 0e551edb06
2 changed files with 4 additions and 3 deletions

View File

@@ -282,7 +282,7 @@ pub struct PostgresConnection {
impl ConnCfg {
/// Connect to a corresponding compute node.
pub async fn connect2<M: MakeTlsConnect<tokio::net::TcpStream>>(
pub async fn managed_connect<M: MakeTlsConnect<tokio::net::TcpStream>>(
&self,
ctx: &RequestMonitoring,
timeout: Duration,
@@ -327,7 +327,8 @@ impl ConnCfg {
let mut mk_tls = tokio_postgres_rustls::MakeRustlsConnect::new(client_config);
let (socket_addr, client, connection) = self.connect2(ctx, timeout, &mut mk_tls).await?;
let (socket_addr, client, connection) =
self.managed_connect(ctx, timeout, &mut mk_tls).await?;
tracing::Span::current().record("pid", tracing::field::display(client.get_process_id()));
let stream = connection.stream.into_inner();

View File

@@ -233,7 +233,7 @@ impl ConnectMechanism for TokioMechanism {
let (socket_addr, client, connection) = permit.release_result(
node_info
.config
.connect2(ctx, timeout, &mut tokio_postgres::NoTls)
.managed_connect(ctx, timeout, &mut tokio_postgres::NoTls)
.await,
)?;