2
0
mirror of https://github.com/Genymobile/scrcpy synced 2025-08-31 22:35:37 +00:00

Fix double adb tunnel closing

On error, close the adb tunnel only if it has not already been closed
beforehand.
This commit is contained in:
Romain Vimont
2022-02-12 12:44:02 +01:00
parent 5c62f3419d
commit d0ab8c0e7b

View File

@@ -482,8 +482,10 @@ fail:
} }
} }
if (tunnel->enabled) {
// Always leave this function with tunnel disabled // Always leave this function with tunnel disabled
sc_adb_tunnel_close(tunnel, &server->intr, serial); sc_adb_tunnel_close(tunnel, &server->intr, serial);
}
return false; return false;
} }