diff --git a/CHANGELOG.md b/CHANGELOG.md index 83614d6..f9333c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## 2.3.0 * `Bot`: - * Add option `waitForConnection` in database config + * Add option `reconnectOptions` in database config ## 2.2.0 diff --git a/bot/src/main/kotlin/dev/inmo/plagubot/config/DatabaseConfig.kt b/bot/src/main/kotlin/dev/inmo/plagubot/config/DatabaseConfig.kt index 6b864b8..5a8cd0e 100644 --- a/bot/src/main/kotlin/dev/inmo/plagubot/config/DatabaseConfig.kt +++ b/bot/src/main/kotlin/dev/inmo/plagubot/config/DatabaseConfig.kt @@ -33,6 +33,7 @@ data class DatabaseConfig( password ).also { it.transactionManager.defaultIsolationLevel = Connection.TRANSACTION_SERIALIZABLE // Or Connection.TRANSACTION_READ_UNCOMMITTED + it.connector().close() } }.onFailure { logger.e(it)