Increase JNI timeout duration to 40 seconds and refactor cache key generation for stability. Updated core
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user