diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/handlers/impl/MySQLPersistentDataHandler.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/handlers/impl/MySQLPersistentDataHandler.kt index b1bdda04..cdcaca02 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/handlers/impl/MySQLPersistentDataHandler.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/data/handlers/impl/MySQLPersistentDataHandler.kt @@ -246,14 +246,14 @@ class MySQLPersistentDataHandler( } } - private inline fun withRetries(action: () -> T): T { + private inline fun withRetries(action: () -> T): T? { var retries = 1 while (true) { try { return action() } catch (e: Exception) { if (retries > 5) { - throw e + return null } retries++