HHH-14317 Avoid closing datasource in AgroalConnectionProvider if datasource is not initialized

This commit is contained in:
Guillaume Smet 2020-11-09 15:16:03 +01:00 committed by Sanne Grinovero
parent a393cbd7f5
commit 5410e6350b
1 changed files with 3 additions and 1 deletions

View File

@ -139,6 +139,8 @@ public class AgroalConnectionProvider implements ConnectionProvider, Configurabl
@Override
public void stop() {
agroalDataSource.close();
if ( agroalDataSource != null ) {
agroalDataSource.close();
}
}
}