Browse Source

中断废弃的线程

release/9.0
abel.chen 6 years ago
parent
commit
c9b7d98df8
  1. 4
      fine-druid/src/com/fr/third/alibaba/druid/pool/DruidDataSource.java

4
fine-druid/src/com/fr/third/alibaba/druid/pool/DruidDataSource.java

@ -609,7 +609,9 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
createConnectionThread.setStarted(false);
String destroyName = "Druid-ConnectionPool-Destroy-" + System.identityHashCode(this) + this.getUrl();
if (destroyConnectionThread != null) {
destroyConnectionThread.interrupt();
if (!destroyConnectionThread.isInterrupted()) {
destroyConnectionThread.interrupt();
}
}
destroyConnectionThread = new DestroyConnectionThread(destroyName);
destroyConnectionThread.setStarted(false);

Loading…
Cancel
Save