Skip to content

Commit

Permalink
cli: caculate the wait_time in milliseconds
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Alexey Tikhonov <[email protected]>
(cherry picked from commit a997ee7)
  • Loading branch information
Geass-LL authored and pbrezina committed Oct 6, 2023
1 parent 8d5752f commit 129ceae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sss_client/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 129ceae

Please sign in to comment.