Skip to content

Display and control your Android device

Use net_recv() to read only one byte

Romain Vimont0dee9b04b286
diff --git a/app/src/server.c b/app/src/server.c
index 8760362b..87a61fb7 100644
--- a/app/src/server.c
+++ b/app/src/server.c
@@ -119,7 +119,7 @@ connect_and_read_byte(uint16_t port) {
char byte;
// the connection may succeed even if the server behind the "adb tunnel"
// is not listening, so read one byte to detect a working connection
- if (net_recv_all(socket, &byte, 1) != 1) {
+ if (net_recv(socket, &byte, 1) != 1) {
// the server is not listening yet behind the adb tunnel
return INVALID_SOCKET;
}