From d12fbbd339f6f34108301aa08d1377eceea250a5 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 20 Jan 2023 11:08:31 +0100 Subject: [PATCH] Potential SQL connection churn fix Signed-off-by: Lixfel --- src/de/steamwar/sql/internal/Statement.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/steamwar/sql/internal/Statement.java b/src/de/steamwar/sql/internal/Statement.java index f78f0d4..e842d5f 100644 --- a/src/de/steamwar/sql/internal/Statement.java +++ b/src/de/steamwar/sql/internal/Statement.java @@ -234,7 +234,7 @@ public class Statement implements AutoCloseable { private static Connection aquireConnection() { synchronized (connections) { - if(connections.isEmpty() && connectionBudget == 0) + while(connections.isEmpty() && connectionBudget == 0) waitOnConnections(); if(!connections.isEmpty()) {