mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for dataSource.restart()
This commit is contained in:
@@ -286,9 +286,12 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
return discardCount;
|
||||
}
|
||||
|
||||
public void restart() {
|
||||
public void restart() throws SQLException {
|
||||
lock.lock();
|
||||
try {
|
||||
if (activeCount > 0) {
|
||||
throw new SQLException("can not restart, activeCount not zero. " + activeCount);
|
||||
}
|
||||
if (LOG.isInfoEnabled()) {
|
||||
LOG.info("{dataSource-" + this.getID() + "} restart");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user