From 62a443222c8f660438251ef17cb2ca088f48e207 Mon Sep 17 00:00:00 2001 From: Paul Hemberger Date: Mon, 27 Mar 2023 16:47:58 -0400 Subject: [PATCH] use correct error type --- tokio-postgres/src/connect_socket.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokio-postgres/src/connect_socket.rs b/tokio-postgres/src/connect_socket.rs index 7937df28..9b3d31d7 100644 --- a/tokio-postgres/src/connect_socket.rs +++ b/tokio-postgres/src/connect_socket.rs @@ -42,7 +42,7 @@ pub(crate) async fn connect_socket( { sock_ref .set_tcp_user_timeout(tcp_user_timeout) - .map_err(Error::timeout)?; + .map_err(Error::connect)?; } if let Some(keepalive_config) = keepalive_config {