diff --git a/app/src/server.c b/app/src/server.c index 0de51c7e..a4090f00 100644 --- a/app/src/server.c +++ b/app/src/server.c @@ -482,8 +482,10 @@ fail: } } - // Always leave this function with tunnel disabled - sc_adb_tunnel_close(tunnel, &server->intr, serial); + if (tunnel->enabled) { + // Always leave this function with tunnel disabled + sc_adb_tunnel_close(tunnel, &server->intr, serial); + } return false; }