This commit is contained in:
Horis
2026-01-09 11:34:11 +08:00
parent ed6704a498
commit 4f0ace3887
@@ -65,11 +65,13 @@ object SourceVerificationHelp {
LockSupport.parkNanos(this, waitTime) LockSupport.parkNanos(this, waitTime)
} }
return getResult(source.getKey())!!.let { val result = getResult(source.getKey())!!
it.ifBlank { clearResult(source.getKey())
throw NoStackTraceException("验证结果为空") result.ifBlank {
} throw NoStackTraceException("验证结果为空")
} }
return result
} }
/** /**
@@ -109,10 +111,7 @@ object SourceVerificationHelp {
} }
fun getResult(sourceKey: String): String? { fun getResult(sourceKey: String): String? {
val key = getVerificationResultKey(sourceKey) return CacheManager.getFromMemory(getVerificationResultKey(sourceKey)) as? String
val result = CacheManager.getFromMemory(key) as? String
CacheManager.deleteMemory(key)
return result
} }
fun clearResult(sourceKey: String) { fun clearResult(sourceKey: String) {