From f7e0cc61dd179635e7658f2b31705590862a4cf9 Mon Sep 17 00:00:00 2001 From: licunlong Date: Fri, 29 Sep 2023 12:24:45 +0800 Subject: [PATCH] cli: caculate the wait_time in milliseconds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The timeout we pass in is 300000ms, and we sleep 1s every time we get a EAGAIN error, so we need to multiply 1000 for sleep_time. Reviewed-by: Alejandro López Reviewed-by: Alexey Tikhonov --- src/sss_client/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sss_client/common.c b/src/sss_client/common.c index 53ff6e8e9a8..c80c8e74b77 100644 --- a/src/sss_client/common.c +++ b/src/sss_client/common.c @@ -617,7 +617,7 @@ static int sss_cli_open_socket(int *errnop, const char *socket_name, int timeout socklen_t errnosize; struct pollfd pfd; - wait_time += sleep_time; + wait_time += sleep_time * 1000; ret = connect(sd, (struct sockaddr *)&nssaddr, sizeof(nssaddr));