diff --git a/src/main.rs b/src/main.rs index 37c7415..253f477 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,9 +13,7 @@ async fn main() -> std::io::Result<()> { let configuration = get_configuration().expect("Failed to read configuration."); let connection_pool = PgPoolOptions::new() .connect_timeout(std::time::Duration::from_secs(2)) - .connect_with(configuration.database.with_db()) - .await - .expect("Failed to connect to Postgres."); + .connect_lazy_with(configuration.database.with_db()); let sender_email = configuration .email_client