Commit 2b7b9959 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Wake up ALL waiting threads. JM-488

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@3189 b35dd754-fafc-0310-a699-88a17e54d16e
parent eb28c633
...@@ -165,7 +165,7 @@ public class ConnectionPool implements Runnable { ...@@ -165,7 +165,7 @@ public class ConnectionPool implements Runnable {
} }
catch (InterruptedException ex) { catch (InterruptedException ex) {
--waitingForCon; --waitingForCon;
waitLock.notify(); waitLock.notifyAll();
throw new SQLException("Interrupted while waiting for connection to " + throw new SQLException("Interrupted while waiting for connection to " +
"become available."); "become available.");
...@@ -177,7 +177,7 @@ public class ConnectionPool implements Runnable { ...@@ -177,7 +177,7 @@ public class ConnectionPool implements Runnable {
public void freeConnection() { public void freeConnection() {
synchronized (waitLock) { synchronized (waitLock) {
if (waitingForCon > 0) { if (waitingForCon > 0) {
waitLock.notify(); waitLock.notifyAll();
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment