Use the timeout value for non-blocking

pull/470/head
Anthony Hu 2024-11-21 10:45:14 -05:00
parent 94e089eea8
commit b848ae0527
2 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,9 @@ static int tcp_select(SOCKET_T socketfd, int to_sec, int rx)
else
sendfds = &fds;
timeout.tv_sec = to_sec;
timeout.tv_usec = 0;
result = select(nfds, recvfds, sendfds, &errfds, &timeout);
if (result == 0)

View File

@ -69,6 +69,9 @@ static int tcp_select(SOCKET_T socketfd, int to_sec, int rx)
else
sendfds = &fds;
timeout.tv_sec = to_sec;
timeout.tv_usec = 0;
result = select(nfds, recvfds, sendfds, &errfds, &timeout);
if (result == 0)