From 50aa5880de323a45ac9567d5f03e6b059b543ffd Mon Sep 17 00:00:00 2001 From: rustdesk Date: Wed, 12 Jun 2024 02:34:15 +0800 Subject: [PATCH] always call platformFFI.nextRgba no matter what to avoid dead lock because of unknown reason --- flutter/lib/models/model.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart index 54ba4e595..1c03c3c26 100644 --- a/flutter/lib/models/model.dart +++ b/flutter/lib/models/model.dart @@ -2504,12 +2504,15 @@ class FFI { // Fetch the image buffer from rust codes. final sz = platformFFI.getRgbaSize(sessionId, display); if (sz == 0) { + platformFFI.nextRgba(sessionId, display); return; } final rgba = platformFFI.getRgba(sessionId, display, sz); if (rgba != null) { onEvent2UIRgba(); imageModel.onRgba(display, rgba); + } else { + platformFFI.nextRgba(sessionId, display); } } } else if (message is EventToUI_Texture) {