diff options
Diffstat (limited to 'src/android_ctrl_sock.c')
-rw-r--r-- | src/android_ctrl_sock.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/android_ctrl_sock.c b/src/android_ctrl_sock.c index 8be17a5..c0620c8 100644 --- a/src/android_ctrl_sock.c +++ b/src/android_ctrl_sock.c @@ -176,11 +176,12 @@ int fastd_android_receive_tunfd(void) { int handle; if (ancil_recv_fd(ctx.android_ctrl_sock_fd, &handle)) { - exit_errno("could not receive TUN handle from Android"); - } else { - pr_debug("received fd: %u", handle); + pr_error("could not receive TUN handle from Android"); + return -1; } + pr_debug("received fd: %u", handle); + return handle; } |