diff --git a/backend/windmill-worker/src/pg_executor.rs b/backend/windmill-worker/src/pg_executor.rs index 464a617ae4097..ca97af4d5fae1 100644 --- a/backend/windmill-worker/src/pg_executor.rs +++ b/backend/windmill-worker/src/pg_executor.rs @@ -289,6 +289,7 @@ pub async fn do_postgresql( tracing::error!("connection error: {}", e); } }); + drop(mtex); (Some((client, handle)), None) } else { tracing::info!("Creating new connection"); @@ -307,6 +308,7 @@ pub async fn do_postgresql( tracing::error!("connection error: {}", e); } }); + drop(mtex); (Some((client, handle)), None) };