2
0
mirror of https://github.com/Genymobile/scrcpy synced 2025-09-01 14:55:13 +00:00

Remove the "adb reverse" tunnel immediately

As soon as we accepted a connection, we can remove the "adb reverse"
tunnel.
This commit is contained in:
Romain Vimont
2018-02-08 17:38:38 +01:00
parent 3b06e7d500
commit e1749a0c09
3 changed files with 9 additions and 3 deletions

View File

@@ -311,7 +311,7 @@ SDL_bool scrcpy(const char *serial, Uint16 local_port, Uint16 max_size, Uint32 b
// to reduce startup time, we could be tempted to init other stuff before blocking here
// but we should not block after SDL_Init since it handles the signals (Ctrl+C) in its
// event loop: blocking could lead to deadlock
TCPsocket device_socket = server_connect_to(&server);
TCPsocket device_socket = server_connect_to(&server, serial);
if (!device_socket) {
server_stop(&server, serial);
return SDL_FALSE;