Updated withRetries for MySQL

This commit is contained in:
Auxilor
2024-08-27 16:03:55 +01:00
parent c95c1f032d
commit 4e6960fab5

View File

@@ -246,14 +246,14 @@ class MySQLPersistentDataHandler(
}
}
private inline fun <T> withRetries(action: () -> T): T {
private inline fun <T> withRetries(action: () -> T): T? {
var retries = 1
while (true) {
try {
return action()
} catch (e: Exception) {
if (retries > 5) {
throw e
return null
}
retries++