From a682e51f37ec49c0d577cb031639ab1c365a3d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Wed, 20 Nov 2024 00:33:54 +0100 Subject: [PATCH] fruity: Only assume jailed if connection refused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bubble up all other errors. Co-authored-by: Håvard Sørbø --- src/fruity/fruity-host-session.vala | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/fruity/fruity-host-session.vala b/src/fruity/fruity-host-session.vala index d85be1483..cc0806de2 100644 --- a/src/fruity/fruity-host-session.vala +++ b/src/fruity/fruity-host-session.vala @@ -1059,9 +1059,9 @@ namespace Frida { try { return yield get_remote_server (cancellable); } catch (Error e) { - if (e is Error.PERMISSION_DENIED || e is Error.TIMED_OUT) - throw e; - return null; + if (e is Error.SERVER_NOT_RUNNING) + return null; + throw e; } } @@ -1135,10 +1135,8 @@ namespace Frida { last_server_check_timer = null; last_server_check_error = null; } else { - if (e is Error.PERMISSION_DENIED || e is Error.TIMED_OUT) { + if (e is Error) { api_error = e; - } else if (e is Error.SERVER_NOT_RUNNING) { - api_error = new Error.SERVER_NOT_RUNNING ("Unable to connect to remote frida-server"); } else if (connection != null) { api_error = new Error.PROTOCOL ("Incompatible frida-server version"); } else {