diff --git a/src/android.c b/src/android.c index 26ee6d77..deb8bee4 100644 --- a/src/android.c +++ b/src/android.c @@ -92,7 +92,7 @@ protect_socket(int fd) return ret; } -void +int send_traffic_stat(uint64_t tx, uint64_t rx) { int sock; @@ -129,11 +129,5 @@ send_traffic_stat(uint64_t tx, uint64_t rx) return -1; } - if (recv(sock, &ret, 1, 0) == -1) { - ERROR("[android] recv"); - close(sock); - return -1; - } - close(sock); } diff --git a/src/common.h b/src/common.h index 033f0ade..079c367f 100644 --- a/src/common.h +++ b/src/common.h @@ -47,7 +47,7 @@ void free_udprelay(void); #ifdef __ANDROID__ int protect_socket(int fd); -void send_traffic_stat(uint64_t tx, uint64_t rx); +int send_traffic_stat(uint64_t tx, uint64_t rx); #endif #define STAGE_ERROR -1 /* Error detected */