From aa6d95763e983347acfae0508c2558a1f57f90e5 Mon Sep 17 00:00:00 2001 From: Unsung Lee Date: Fri, 15 Jul 2022 17:06:43 +0900 Subject: [PATCH] Delete non-blocking option (SOCK_NONBLOCK) recv() will be delayed until timeout Change-Id: Ia1fe772091e648abff9c34f2466ec7e370457713 Signed-off-by: Unsung Lee --- src/plugin/plugin.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugin/plugin.c b/src/plugin/plugin.c index 87e4cb9..1cb48b9 100644 --- a/src/plugin/plugin.c +++ b/src/plugin/plugin.c @@ -50,7 +50,7 @@ static int resource_create_and_connect_sock(void) socklen_t size; struct sockaddr_un sockaddr; - sock = socket(AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0); + sock = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); if (sock < 0) { _E("[CPU-BOOSTING-PLUGIN] Failed to allocate a socket"); return -1; @@ -235,6 +235,7 @@ retry_header: if (errno == EAGAIN && retry == false) { retry = true; sleep(1); + _I("[CPU-BOOSTING-PLUGIN] retry"); goto retry_header; } @@ -266,6 +267,7 @@ retry_body: if (errno == EAGAIN && retry == false) { retry = true; sleep(1); + _I("[CPU-BOOSTING-PLUGIN] retry"); goto retry_body; } -- 2.34.1