sssd/backport-cli-caculate-the-wait_time-in-milliseconds.patch
2023-11-28 15:55:49 +08:00

38 lines
1.2 KiB
Diff

From a997ee7bd9d259e7faf654cb94145c0135df02f8 Mon Sep 17 00:00:00 2001
From: licunlong <shenxiaogll@163.com>
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 <allopez@redhat.com>
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reference: https://github.com/SSSD/sssd/commit/a997ee7bd9d259e7faf654cb94145c0135df02f8
Conflict: NA
---
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 53ff6e8e9..c80c8e74b 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));
--
2.33.0