mirror of https://github.com/Genymobile/scrcpy
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:
parent
5c62f3419d
commit
d0ab8c0e7b
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue