mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-06 13:02:55 +00:00
Remove unnecessary dependencies to synchronous 'postgres' crate (#10938)
The synchronous 'postgres' crate is just a wrapper around the async 'tokio_postgres' crate. Some places were unnecessarily using the re-exported NoTls and Error from the synchronous 'postgres' crate, even though they were otherwise using the 'tokio_postgres' crate. Tidy up by using the tokio_postgres types directly.
This commit is contained in:
committed by
GitHub
parent
df264380b9
commit
a6f315c9c9
@@ -343,8 +343,11 @@ async fn recovery_stream(
|
||||
cfg.replication_mode(tokio_postgres::config::ReplicationMode::Physical);
|
||||
|
||||
let connect_timeout = Duration::from_millis(10000);
|
||||
let (client, connection) = match time::timeout(connect_timeout, cfg.connect(postgres::NoTls))
|
||||
.await
|
||||
let (client, connection) = match time::timeout(
|
||||
connect_timeout,
|
||||
cfg.connect(tokio_postgres::NoTls),
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(client_and_conn) => client_and_conn?,
|
||||
Err(_elapsed) => {
|
||||
|
||||
Reference in New Issue
Block a user