Asynced getConnection() where possible
This commit is contained in:
1 parent
6e00083785
commit
4cc4f87fbd
2 files changed
+25
-15
No files matched your search
@@ -58,7 +58,7 @@ public class MySQLConnectionPool implements Closeable
|
||||
}
|
||||
|
||||
public Connection getConnection() throws SQLException, InterruptedException, TimeoutException {
|
||||
if (!lock.tryLock(1000, TimeUnit.MILLISECONDS))
|
||||
if (!lock.tryLock(3000, TimeUnit.MILLISECONDS))
|
||||
throw new TimeoutException();
|
||||
try {
|
||||
JDCConnection conn;
|
||||
|
||||
Reference in new issue
Block a user