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]>
  • Loading branch information
Geass-LL authored and madhuriupadhye committed Nov 23, 2023
1 parent cfe8ef5 commit f7e0cc6
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 f7e0cc6

Please sign in to comment.