Skip to content

Commit

Permalink
fruity: Only assume jailed if connection refused
Browse files Browse the repository at this point in the history
Bubble up all other errors.

Co-authored-by: Håvard Sørbø <[email protected]>
  • Loading branch information
oleavr and hsorbo committed Dec 5, 2024
1 parent bdf1200 commit a682e51
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/fruity/fruity-host-session.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a682e51

Please sign in to comment.