Increase JNI timeout duration to 40 seconds and refactor cache key generation for stability. Updated core

This commit is contained in:
2025-12-27 02:46:10 +00:00
parent dda4c23fd0
commit 8deda0c0b4
2 changed files with 2 additions and 3 deletions

Binary file not shown.

View File

@@ -319,7 +319,7 @@ class AniyomiBridge {
_pendingRequests[message.id] = completer;
_jniSenderPort.send(message);
return completer.future.timeout(
const Duration(seconds: 20),
const Duration(seconds: 40),
onTimeout: () => throw TimeoutException("JNI Isolate timed out")
);
}
@@ -426,9 +426,8 @@ class AniyomiBridge {
);
}
/// Creates a stable string representation of the args
String _generateCacheKey(JniIsolateMessageType messageType, Map<String, dynamic> args) {
// Create a stable string representation of the args
// final argsString = jsonEncode(args);
final argsString = args.entries
.map((entry) => "${entry.key}:${_getStableHashCode(entry.value)}")
.join(":").hashCode;